Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete Java program that do the following: 1. Asks the user to enter his name and his student ID. 2. Generates a
Write a complete Java program that do the following: 1. Asks the user to enter his name and his student ID. 2. Generates a password for the student based on his ID according to the following rules: a. The generated password is a number of 4 digits b. The first digit (ones) is the first digit of your student ID. c. The second digit (tens) is the sum of the fourth and fifth digit of your student ID. If the sum is greater than 9 then consider the ones: for example, if the sum is equal to 17 then the second digit will be 7. d. The third digit (hundred) is the third digit of your student ID The fourth digit (thousand) is the second digit multiply by 4. If the value is greater than 9 then consider the ones: for example, if the value is equal to 24 then the fourth digit will be 4. 3. Prints a hello message with the student's name and the generated password. e. Typical runs of the program Bluel: Terminal Windo... Options Please give your name Mohamed Please give your student id 123456789 Hello Mr. Mohamed Your password is: 2719 X Can only enter input while y Bluel: Terminal Windo.... Options Please give your name Khaled Please give your student id 123482345 Hello Mr. Khaled Your password is: 6305 X Can only enter input while y Bluel: Terminal Windo... x Options Please give your name Zina Please give your student id 987654321 Hello Mr. Zina Your password is: 8391 Can only enter input while y
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