Question: Question 2: Driver's License number generator (8 Marks) Name your program as LastName_FirstName_A2Q2.java License number is a unique number assigned to each Driver's license.


Question 2: Driver's License number generator (8 Marks) Name your program as

Question 2: Driver's License number generator (8 Marks) Name your program as LastName_FirstName_A2Q2.java License number is a unique number assigned to each Driver's license. Every country has a different process on creating one. Manitoba has a pretty unique way of generating a license number. This is partially based on your first name, last name and some random numbers that are generated to make it unique for each individual. For example, for name Stew Dent, license number can be D-E-N-T-S-*878TW. The purpose of this question is to replicate that process to a certain extent. It will use the first and last name of the users however will only use length of last name instead of last set of random numbers. For example, for name Stew Dent, license number should be D-E-N-T-S-*4. Where D-E-N-T is student's last name, S is the first letter of his first name and 4 is the length of his first name. To achieve that, program will scan through the last name and is required to insert hyphen (-). Write a Java program to ask user for its first and last name. It then does processing with that information to generate a unique license number. . Following information will be asked from the user: . First name: This will be entered as a String type. Last name: This will be entered as a String type. Following processing will be done with the information. 0 Scan the last name and print each letter with a - between them. After scanning the last name, first letter of first name is added. 0 Once the first letter is printed, License number is generated by scanning through the last name and add-after every character. Once the scan is done for the last name, first letter of the first name is added after a-. 0 In the end, an asterix (*) with the length of first name is added. . Output should look something like this, Enter your First name: Stew Enter your Last name: Dent Your License is: D-e-n-t-8-4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!