Answered step by step
Verified Expert Solution
Link Copied!

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

image

image  

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Give three explanations for the law of demand

Answered: 1 week ago