Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA The Department of Motor Vehicles (DMV) is responsible for issuing drivers licenses. This section of the lab asks you to write a 2

IN JAVA

The Department of Motor Vehicles (DMV) is responsible for issuing drivers licenses. This section of the lab asks you to write a 2 Java classes License and DMV..

The License should have the following pieces of information:

The users last name

The users first name

The user's middle name

The users date of birth

A drivers license number that consists of the first 5 characters of the last name plus 4 random digits.

An expiration date which is the users birth date except for the year which should be 2028.

The DMV class issues licenses and keeps track of all the licensed drivers. When run, the program prompts the DMV employee to enter the full name (first, middle, and last) of the applicant and their date of birth. The program then produces a drivers license. To begin with, provide space for 20 drivers licenses in total.

Make sure to implement the constructor(s) and the toString methods correctly.

Here is an example of what the program produces when run:

image text in transcribed

i Chrome File Edit View History Bookmarks People Window Help *71% Wed 2:23 PM What's the simplest w java Reading intege X \ Java dynamic array s ArrayList Java Platfo X y Lab Assignment 3:Cr , Lesson: Classes and C blaine e X x \ Details ** stca.instructure.com/courses/1575483/assignments/674 3689#submit Car.java Here is an example of what the program produces when run: Welcome to the DMV! Please enter the first, middle, and last name of the applicant: Christina Anne Balistreri Enter date of birth (MA/DD/YYYY): 82/14/1978 California Driver License LIC# Bal is8572 LN Balistreri FN Christina WN Anne DOB 02/14/1978 EXP 05/18/2028 From here, add functionality to the DMV interface. Give the DMV employee the following options to do the following : (1) Issue a new license (2 List all the licensed drivers to the screen, 3) List the information of a particular driver if provided a specific license number. (4) Change the name of the driver if provided a specific license number Make sure to break your program into methods per functionality. Do not keep everything in the main method. Also give a reasonable response for invalid user input. (For example, if a given license number is not valid, respond appropriately) If more than 20 driver's licenses are issued, expand your 'database" (create a bigger array and make sure existing drivers remain intact) when the next new license is about to be issued. Add a fourth functionality to revoke a license when given a license number i.e. remove a License from the list) Make sure to fill or adjust the gap in the array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions