Module is about Loops (Repetition) Required Skills Inventory Write a method that takes no arguments and
Fantastic news! We've Found the answer you've been seeking!
Question:
Module is about Loops (Repetition)
Transcribed Image Text:
Required Skills Inventory • Write a method that takes no arguments and returns a value Use System.out.print to prompt the user for input • Use a Scanner to collect user input • Use String methods to compare String values Do not use any language features that have not been covered to this point in the course materials. Problem Description and Given Info Pearl's Pancake Pad is a growing restaurant business. They would like to upgrade their existing pen-and-paper system for tracking tickets to a digital point of sale system. They are asking you to build that point of sale program for them. The point of sale program must: 1. Allow the waitstaff to input the item ordered by each diner at a given table o Each table can seat up to 4 diners. 2. For each diner at the table, the system must: 1. Display a menu of at least 7 common breakfast items 2. Allow the waitstaff to enter the items the diner has ordered ■ Each diner may order as many items as they want 3. After the orders for all diners at a table have been entered, the system must display: 1. total price the whole tab (pre-tax) 2. total tax for the whole table (tax is 8% of the total price) 3. suggested tip amounts for 10%, 15%, 20% and 25% tips for whole table (on the pre-tax total) 4. the program should continue to ask if there are more tables, and repeat the steps described above for each table. 5. After all table's orders have been processed, the program should print out the register total (total price + tax for all tables) for the day. Part 4 Design and write a public static method named dinerWantsAnother Item. This method should take no arguments, and should return a boolean value. When called, this method will ask the user if the diner wants another item from the menu, collect the user's input as a String (either "yes" or "no"), and return a boolean. Be sure to use the next method of the Scanner, and not the nextLine method. Calling dinerWantsAnother Item() might result in an interaction with the user that looks like this: Another item ('yes' or 'no')? yes In the example above, the method would return the boolean value true. If the user's input was the String value "no", then the method would return the boolean value false. Notes: You may wish to write some additional code, in the main method, to test your method. Do not declare or instantiate a Scanner in any of your methods. Use the public static Scanner named scnr that has been provided for you in the code given for this challenge. Required Skills Inventory • Write a method that takes no arguments and returns a value Use System.out.print to prompt the user for input • Use a Scanner to collect user input • Use String methods to compare String values Do not use any language features that have not been covered to this point in the course materials. Problem Description and Given Info Pearl's Pancake Pad is a growing restaurant business. They would like to upgrade their existing pen-and-paper system for tracking tickets to a digital point of sale system. They are asking you to build that point of sale program for them. The point of sale program must: 1. Allow the waitstaff to input the item ordered by each diner at a given table o Each table can seat up to 4 diners. 2. For each diner at the table, the system must: 1. Display a menu of at least 7 common breakfast items 2. Allow the waitstaff to enter the items the diner has ordered ■ Each diner may order as many items as they want 3. After the orders for all diners at a table have been entered, the system must display: 1. total price the whole tab (pre-tax) 2. total tax for the whole table (tax is 8% of the total price) 3. suggested tip amounts for 10%, 15%, 20% and 25% tips for whole table (on the pre-tax total) 4. the program should continue to ask if there are more tables, and repeat the steps described above for each table. 5. After all table's orders have been processed, the program should print out the register total (total price + tax for all tables) for the day. Part 4 Design and write a public static method named dinerWantsAnother Item. This method should take no arguments, and should return a boolean value. When called, this method will ask the user if the diner wants another item from the menu, collect the user's input as a String (either "yes" or "no"), and return a boolean. Be sure to use the next method of the Scanner, and not the nextLine method. Calling dinerWantsAnother Item() might result in an interaction with the user that looks like this: Another item ('yes' or 'no')? yes In the example above, the method would return the boolean value true. If the user's input was the String value "no", then the method would return the boolean value false. Notes: You may wish to write some additional code, in the main method, to test your method. Do not declare or instantiate a Scanner in any of your methods. Use the public static Scanner named scnr that has been provided for you in the code given for this challenge.
Expert Answer:
Answer rating: 100% (QA)
Lets start by breaking down the problem First we need to create a method called dinerWantsAnother... View the full answer
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
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...
-
The Acme Insurance Company purchased a five-year bond whose interest rate floats with LIBOR. Specifically, the interest rate in a given year is equal to LIBOR plus 200 basis points. At the same time...
-
Martha has a 3-year-old child and pays $10,000 a year in day care costs. Her salary is $45,000. How much is her child and dependent care credit?
-
Use the geometric series to determine the Maclaurin series and the interval of convergence for the following functions. 00 k=0 1 1- x' for x < 1,
-
The production department of Zunni's Manufacturing is considering two numerically controlled drill presses; one must be selected. Comparison data is shown in the table below. MARR is 10 percent/year....
-
Examine the tests of controls and substantive tests of transactions results, including the sampling application in Case 18-32, for Ward Publishing Company. Assume that you have already reached...
-
What is the central concept in urban economics that says people/businesses being physically next together increases overall productivity? Why does it increase productivity?
-
Select at least three Enterprise Resource Management (ERM) programs, such as SAP. Provide an overview of each of the ERM program Compare and contrast the three programs highlighting similarities and...
-
Sheng Siong is one of Singapore's largest retailers with 64 stores located all across the island. Sheng Siong's chain stores are designed to provide customers with both "wet and dry" shopping options...
-
4. Interrupt priority. Suppose that the interrupt sources Timero clear timer on compare match (CTC), external interrupt 1 (INT1), and the transmit complete serial interrupt are enabled. Answer the...
-
The Government of Canada auctioned a new benchmark 2 year bond, to settle on October 2nd, 2020. The bond has a maturity of November 1st, 2022. Assume the bond pays coupons semi-annually and has an...
-
For the block diagram shown below, find the transfer function Y(s) U(s) answer. Step U(s) Answer: Y(s) U(s) Use proper form to represent the transfer function in your 1 S+2 Y(s) Transfer Fcn Scope...
-
(a) The following information on credit and advances are found in the book of Jack and Jane bank: i. Letter of credit GHC40000.00 ii. iii. iv. Mortgage GHC23000.00 Personal loan GHC2400 Bankers'...
-
What is meant by the term double-entry procedure or duality? Does this double-entry accounting system make sense? Conceive other possible methods for recording changes in accounts?
-
Data 9.2 on page 540 introduces the dataset Cereal, which includes information on the number of grams of fiber in a serving for 30 different breakfast cereals. The cereals come from three different...
-
Extend the classic cuckoo hash table to use d hash functions.
-
a. Give a precise expression for the minimum number of nodes in an AVL tree of height h. b. What is the minimum number of nodes in an AVL tree of height 15?
-
Prove the following formulas: a. log X < X for all X > 0 b. log(AB) = B log A
-
Deficits and fiscal consolidation As seen in the following table, the 2008 financial crisis left the United States with an enormous federal budget deficit in 2009. There was a substantial fiscal...
-
Which (if any) of the following statements about Pvalues is CORRECT? A. The Pvalue from a hypothesis test is the probability of obtaining your results, or more extreme results. B. The Pvalue from a...
-
Which (if any) of the following statements about the Type I error is CORRECT? A. The Type I error is the probability of rejecting the null hypothesis when it is true. B. The Type I error is the...
Study smarter with the SolutionInn App