subject

Write a program for the Department of Motor Vehicles that allows new drivers to obtain a license and existing drivers
to renew their licenses or pay violations,
New licenses are randomly generated numbers >= 3000 and
less than 4000. The fee for a new license is the last digit of
the generated license Id in dollars.
If an existing driver with a license Id >= 2000 and less than
3000 attempts to renew his or her license, the program responds that
his or her license is suspended. The fee for other drivers to
renew their license is either the license Id divided by
one hundred or 10 dollars, whichever is greater.
The fee for an existing driver to pay his or her violations is
the number of violations times the license Id divided by one hundred.
The result is rounded up to the next whole dollar amount.
*
求 * IMPORTANT IMPORTANT IMPORTANT *
Your program must duplicate the sample runs exactly.
DO NOT USE arrays, loops, or any Java constructs not taught yet
in class. Also do not use any Java API classes except
Scanner, System, String, and Math.
* IMPORTANT IMPORTANT IMPORTANT *
SAMPLE RUNS:
Are you a new driver(Type Y or N)?Y
Your license ID is 3759
Please pay new license fee of $9.0
Are you a new driver(Type Y or N)?N
Enter your licenseId: 2501
Select a service
- Renew License
1 - Pay Violation(s):0
Your license is suspended and cannot be renewed
Are you a new driver(Type Y or N)?N
Enter your licenseId: 1234
Select a service
- Renew License
1 - Pay Violationen


Write a program for the Department of Motor Vehicles that

allows new drivers to obtain a license

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, evanwall91
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
image
Computers and Technology, 24.06.2019 11:30, smann211
Convert 11001110(acdd notation) into decimal
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, coursonianp8izbc
Do you think media is stereotype ? and why?
Answers: 1
You know the right answer?
Write a program for the Department of Motor Vehicles that allows new drivers to obtain a license an...

Questions in other subjects:

Konu
Mathematics, 07.10.2019 09:00
Konu
Mathematics, 07.10.2019 09:00