Write a complete Java program that do the following: 1. Asks the user to enter his...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
: (i) What data structures are maintained by the page manager. (ii) What happens when a machine performs a read operation to a page. (iii) What happens when a machine performs a write operation to a...
-
Draw a standard normal probability function and show the area under the curve for (a) Plus or minus one standard deviation from the mean (b) Plus or minus two standard deviations from the mean (c)...
-
Comment on the following transactions: a. Mort owns 500 shares of Pear, Inc. stock with an adjusted basis of $22,000. On July 28, 2016, he sells 100 shares for $3,000. On August 16, 2016, he...
-
A long solenoid has n turns per unit length and carries a current given by I = 10 sin wt. The solenoid has a circular cross section of radius R. Find the induced electric field at a radius r from the...
-
Define cohabitation.
-
Kim Mills produces three different types of fabric using two departments. In department 1, machines weave the cloth. In department 2, the cloth is dyed a variety of colors. Information for the...
-
What is the amount of cash Target paid to repurchase shares of their own stock during the most recent fiscal year? What is the total par value (not par value per share) of the common stock Target...
-
Do you think the Standardization of the ICAO, and the EASA are important? What do you think International Aviation would be like without the Standardization of the ICAO, and the EASA
-
Red, White and Blue are equal partners. White retires, his share of goodwill is ~ 18,000. The remaining partners have decided to continue the business sharing profits and losses in the ratio of 3 :...
-
A professor was interested in comparing how well her students performed on their midterm and final exams in her calculus course. She randomly sampled 7 students from her class and recorded their...
-
Should I deduct capital dividend received from investment from net income for tax purpose?
-
Discuss how Skinner model can be used to explain the occurrence of certain superstitious behaviors in human beings.
-
On January 1, 2022, Demi Lee and Quinn Brown formed The Custom Cabinets Company. Demi contributed cash of $240,000 to the partnership in return for a 60% interest in capital and profits. Quinn...
-
Consider the initial value problem: 2t + g(t), (1) = 2t2 (-4 t+a Suppose we know that a(t) = is the unique solution to this initial value problem. Find the constants a and B and the vector function...
-
An example of prescriptive analytics is when an action is recommended based on previously observed actions. For example, an analysis might help determine procedures to follow when new accounts are...
-
In 2012, Gale and Cathy Alexander hosted an exchange student, Axel Muller, for 9 months. Axel was part of International Student Exchange Programs (a qualified organization). Axel attended tenth grade...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-7. Ivan sold the following securities during the year and received a Form 1099-B that...
-
Abigail (Abby) Boxer is a single mother working as a civilian accountant for the U.S. Army. Her Social Security number is 676-73-3311 and she lives at 3456 Alamo Way, San Antonio, TX 78249. Helen,...
-
Cruz Manufacturing Ltds sales slumped badly in 2019. For the first time in its history, it operated at a loss. The companys income statement showed the following results from selling 600 000 units of...
-
The following are emails from various students to Dr. Destiny Sands, who is a professor in the English Department. These students are wondering if Dr. Sands would let them register for her...
-
What are some flawed assumptions about workplace communication? What is the reality for each myth?
Study smarter with the SolutionInn App