Question: please write the program in Eclipse and paste the class code,as word document. 1) Write a menu driven program that will obtain user choices and

1) Write a menu driven program that will obtain user choices and calculate the total price of all items purchased. In the main method. The user is asked to pick from any one of the options : 1. Entre 2. Drink 3. quit . If the user picks a choice of 1, ask the user to provide number of plates and then call the method getEntreePrice If the user picks a choice of 2 ask the user to provide the number of glasses and type of drink, call the method getDrinkPrice if the user picks a choice of 3, quit the loop . The program will loop several times and users can keep making choices to buy either entre or drinks, until the user picks a choice of 3. During each loop, the totalPrice is updated. When the program quits the loop print the total price of entre and/or drinks purchased till then. The methods' requirements are as follows getEntreePrice takes as the parameter, the value of number of plates from the user. The getEntreePrice calculates and return the total price of entre. An plate of entre costs $12.00 and total price ofentree = price of a plate times the number of plates. Write a method to satisfy this requirement. Make sure the method call matches the method definition getDrinkPrice takes two parameters: number of drinks and type of drink. Number of drink is an integer and type of drink is a string with two possible values, "hot" or "cold". The getDrinkPrice method calculates and returns the total price of drink as follows: if the drink type is "hot", then unit price of drink is $2.50 per drink, else if the drink type is "cold" then the unit price is $1:50 per drink. Total drink price is number of drinks times the unit price per drink
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
