Your class must also include a method to generate a sales receipt. Using a WHILE loop. The method will collect the price for each food item ordered, and it will keep a subtotal for an arbitrary number of food item. Once the subtotal of all food has been calculated, the method will then determine the amount for gratuity if the party consisted of 6 more people. The grand total will be the subtotal plus gratuity. The method must also display the amount for subtotal, gratuity, and grand total.
Create a Restaurant object, and generate a sales receipt. Use (15%=0.15) as gratuity rate.
0 Comments