Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Background:

When you rent a car from an agency, the key ring has several pieces of information: license plate, make and year of car, and usually a special code. This code could be used for some data processing within the company's computers. This lab will practice determining that special car rental code from the license plate. 

Assignment:

1.       The following sequence of steps will be used to convert a sample license plate into a car rental code. 

a.       A license plate consists of 3 letters followed by a space, followed by a 3-digit integer. For example, CPR 607. 

b.       Add up the ASCII values of the 3 letters, 67 + 80 + 82 = 229. 

c.       Add the sum of the letters to the 3-digit integer.  For example, 229 + 607 = 836. 

d.       Take this sum (836) and determine the integer remainder after dividing by 26: 836 % 26 = 4. 

e.       Determine the 4th letter in the alphabet after the letter 'A': 4th letter after 'A' = 'E' 

f.        Combine the letter and the sum.  Thus, we have  CPR 607 = E836. 

2.       You may assume that all sample data will be in the format of 3 alphabet characters, then a space, followed by a 3-digit integer.

Instructions:

1.      Use either Scanner or GUI to get input.

2.      Prompt and retrieve the make, model, and license plate of the car.

3.       Print the run output in this format.

Make = Chevrolet Model = Suburban CPR 607 = E836

4.       Test the following sample inputs and have it print the corresponding output: Make = Ford, Model = Explorer, Plate = RJK 492

Make = Aston Martin, Model = Coupe, Plate = SPT 309

Considerations:

What instance variables, methods, and imports do you need for this class? What String methods will be helpful? What ASCII values do you need to know? How do mixed data types  interact?

Java, Programming

  • Category:- Java
  • Reference No.:- M91525881
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Java

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As