Special car rental code from the license plate

Assignment Help JAVA Programming
Reference no: EM13865166

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?

Reference no: EM13865166

Questions Cloud

Break ties by comparing x-comparing x-coordinate values : (Book is Building Java Programs 3rd edition) modify the Point class from chapter 8 so that it defines a natural ordering by implementing the Comparable interface. Compare the Points by y-major order; that is, points with smaller y-coordinate values s..
A retreat to a sacred place in mythology : a retreat to a sacred place in mythology
Consolidation test experiment : write just an introduction and methodology about Consolidation Test Experiment,
Fft of a cosine wave : When carrying out an FFT of a cosine wave whose frequency is 0.1Hz and whose amplitude is unity , explain why the peak amplitude measurement obtained in the range 0.09Hz to 0.11Hz should ideally have a value of 0.5?
Special car rental code from the license plate : 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 practi..
Circumstances does a growth in financial flows make exchange : Under what circumstances does a growth in financial flows make exchange rates less stable?
Is it ethical to save four people at the expense of one? : Legal concerns aside would it be ethical for you to save the five people by pushing this stranger to his death? Use the deontological and teleological methods to reason out what you would do and why Is it Ethical to Save Four People at the Expense of..
Write a function to calculate the dft : In Matlab, write a function to calculate the DFT using simple multiplications and summations, write a function to implement the fast fourier transform, and write a function to reorder an array according to bit reversed index. Please provide all co..
That countries in the eurozone decide to pursue a deflationa : Assume that countries in the Eurozone decide to pursue a deflationary fiscal policy. What effect is this likely to have on the UK economy?

Reviews

Write a Review

JAVA Programming Questions & Answers

  The commission employee inherits

The Commission Employee inherits from the Employee class. A Commission Employee contains a commission rate and a sales amount variable which are used as part of the pay calculation. An explicit value constructor should be provided to set all 3 val..

  Design a program that asks the user to enter a series of 20

Number Analysis Program: Design a program that asks the user to enter a series of 20 numbers

  Create java servlets

Create a new JSON "view" (e.g., a JSP page that only displays the JSON representation of the data)

  How to link different classes forms

How to link different classes forms. When a person clicks on A, B, or C the program will go to the addEmployee form or Punch In/Out form in Java.

  Calculate rental fee for different types of borrowable media

Assume that there is an abstract class called Vehicle, which has two concrete subclasses, Car and Truck. There is also an interface Loadable, which only Truck implements - calculate a rental fee for different types of borrowable media (e.g. books,..

  Implement the employee class and its three child classes

Implement the Employee class and its three child classes (ManagementEmployee, EngineeringEmployee and AdministrationEmployee), with all the necessary attributes and methods.

  Implement a fishlake simulation similar to the previous

implement a fishlake simulation similar to the previous assignment. you will then make adjustments to accommodate class

  Design and develop a console application

Required to design and develop a console (text-based) application for a small car servicing company -

  Use java

How to use Java.

  Development of a graphical user interface

Understand actual communication with an SMTP server can be achieved using TCP Sockets and understand the development of a graphical user interface (GUI) and use of event handling.

  Implement/update specific methods for the dfs of a graph

show the DFS order of vertices in the graph, and for each node, specify its parent node in the search (the node from which the currect node was reached). Moreover, display for each node the discovery and finishing time, to check that the Parenthesis ..

  Print two random integers

Type two statements using nextInt() to print two random integers between 0 and 9. End with a newline. Ex:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd