Write a Java program to create a new user ID that meets all of the following...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Java program to create a new user ID that meets all of the following requirements. (35 points) Include comments necessary to explain the operation of your program, and your functions should be limited to those presented in chapters 1 to 5 of the textbook. 1) Ask user to input a new user ID. 2) The following checks must be made against an attempt to create a new user ID. • ID must be between 4 and 7 characters in length. (length >=4 and <=7) ⚫ID must start with 'a' 3) If the rules are violated, this user ID and error message should be displayed, and ask user to input ID again. 4) When a valid use ID is provided, this user ID and appropriate message should be displayed, and your program stops. Sample log: (user inputs are in bold and underlined) Input new ID: cs210 cs210 is invalid. Input new ID: abc abc is invalid. Input new ID: abc210211 abc210211 is invalid. Input new ID: abc210 Congratulations! abc210 is your ID. Write a Java program to create a new user ID that meets all of the following requirements. (35 points) Include comments necessary to explain the operation of your program, and your functions should be limited to those presented in chapters 1 to 5 of the textbook. 1) Ask user to input a new user ID. 2) The following checks must be made against an attempt to create a new user ID. • ID must be between 4 and 7 characters in length. (length >=4 and <=7) ⚫ID must start with 'a' 3) If the rules are violated, this user ID and error message should be displayed, and ask user to input ID again. 4) When a valid use ID is provided, this user ID and appropriate message should be displayed, and your program stops. Sample log: (user inputs are in bold and underlined) Input new ID: cs210 cs210 is invalid. Input new ID: abc abc is invalid. Input new ID: abc210211 abc210211 is invalid. Input new ID: abc210 Congratulations! abc210 is your ID.
Expert Answer:
Answer rating: 100% (QA)
Certainly Heres a Java program that creates a new user ID based on the given requirements import jav... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
Economist Abba Lerner proposed a tariff on oil imports equal to 100 percent of the import price. This tariff is designed to reduce dependence on foreign sources as well as to discourage OPEC from...
-
Based on a sample of data points, what is the best estimate of the population regression line?
-
Use the laws of exponents to simplify the expression. 16 2 16 -1.75
-
In a contract dispute between a US company and a Canadian company, the contract itself referred to provisions of the Uniform Commercial Code. Do these references alone preempt the contract from being...
-
Tanek Industries manufactures and sells three different models of wet-dry shop vacuum cleaners. Although the shop vacs vary in terms of quality and features, all are good sellers. Tanek is currently...
-
Eyeone and SafetyTwo are a cournot duopoly. Inverse demand function of P=160-2Q where total output is Q=Q1+Q2, Eyeone (Q1) SafetyTwo(Q2). Monthly cost is estimated as C=4Q for both. Eyeone is...
-
While pulling out of her driveway, Bethany becomes distracted by a bee and strikes Melanie, who is riding past on a bicycle. Bethany suffers serious injury as a result of the accident while Melanie...
-
Toefield Inc. has developed a powerful efficient snow remover that is significantly less polluting than existing snow removers currently on the market. The company spent $2,000,000 developing this...
-
Peter is an international student currently studying a Master of Professional Accounting degree at TIIS Sydney commencing July 2022. Evaluate whether he is a tax resident of Australia for tax...
-
Use the following information on the economic balance sheet of a bank: Assets ($ million) Cash 20 Liabilities and equity (S million) Demand deposits Interbank deposits 50 Term deposits Loans 200...
-
How can we use tools of digital marketing such as content marketing, SEO, social media marketing, PPC, display advertising, affiliate marketing and email marketing to advance our brand?
-
Phoenix Electronics Inc is evaluating a microprocessor investment. The company's management team rec- ognizes the superiority of the NPV technique, but like the presentational advantages of IRR (for...
-
2. Answer the following questions using Figure 1 (2.5 points each; 15 points total) Figure 1 one individual O-disease dropout Jan 1 Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 31 Assumptions: Each...
-
In a roller coaster ride, a cart goes down a perfectly smooth circular track. At the bottom of the track (point B) the apparent weight of the cart is 3 times the actual weight of the cart. The cart...
-
A Firm intends to invest some capital for a period of 15 years; the Firm's Management considers three Options, each consisting of purchasing a machinery of a specific brand, different for each...
-
The following reactions take place in a batch reactor. Additional information: a. Plot and analyze conversion and the concentrations of A, D, and U as a function of time. When would you stop the...
-
Enrico Fermi was an Italian physicist who received the Nobel Prize for his work on nuclear processes. Fermi was famous for his Back of the Envelope Order of Magnitude Calculation to obtain an...
-
Read over the problems at the end of this chapter. Make up an original problem that uses the concepts presented in this chapter. To obtain a solution: (a) Make up your data and reaction. (b) Use a...
-
Modem databases require a high level of skill and knowledge to be adequately supported. See if you can interview the database administrators in three or four local organizations which nse...
-
What is at common misconception about databases?
-
CASE tools, such as system Architect, are used for database development and support. Search on the Web and in trade journals for some of the popular CASE tools currently in use. a. What CASE tools...
Study smarter with the SolutionInn App