Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started