Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Do not use any data structures such as array or ArrayList to store the data. Use a String object to store the result. Incorporate "this" keyword in...

+ Drink()

+ Drink(String, String, double, int)

+ setDrinkName(String): void

+ getDrinkName(): String

+ setDrinkSize(String): void

+ getDrinkSize(): String

+ setPrice(double): void

+ getPrice(): double

+ setNumberOfOrder(int): void

+ getNumberOfOrder(): int

+ calculateOrderPrice(): double   

+ toString(): String

3. (FastDriveThrough.java) Write menu-driven client program that uses the Entree and Drink classes to simulate food ordering service.

Sample run:

************** "Fast Drive Through" Menu **********

1 --- Purchase Entree:

     Burger - $5.99

     Pizza - $6.50

2 --- Purchase Drink:

     Water - $1.25

     Soda  - $1.50(Add $0.75 for Super Size)

3 --- Check out (Print Receipt)

0 --- Exit

***************************************************

Select an option:

Enter Entree name (Burger or Pizza):

Enter the number of entrees:

You ordered

---------------------

Entree: Burger

Entree Price: $5.99

Number of Entrees: 2

************** "Fast Drive Through" Menu **********

1 --- Purchase Entree:

     Burger - $5.99

     Pizza - $6.50

2 --- Purchase Drink:

     Water - $1.25

     Soda  - $1.50(Add $0.75 for Super Size)

3 --- Check out (Print Receipt)

0 --- Exit

***************************************************

Select an option:

Enter Drink name (Water or Soda):

Size (Regular or Super):

Enter the number of drinks:

You ordered

---------------------

Drink: Soda

Size: Super

Drink Price: $2.25

Number of Drinks: 1

************** "Fast Drive Through" Menu **********

1 --- Purchase Entree:

     Burger - $5.99

     Pizza - $6.50

2 --- Purchase Drink:

     Water - $1.25

     Soda  - $1.50(Add $0.75 for Super Size)

3 --- Check out (Print Receipt)

0 --- Exit

***************************************************

Select an option:

---------------------

Entree: Burger

Entree Price: $5.99

Number of Entrees: 2

Drink: Soda

Size: Super

Drink Price: $2.25

Number of Drinks: 1

Total price before tax: $14.23

Sales Tax Rate: 6.75%

Total price after tax: $15.19

************** "Fast Drive Through" Menu **********

1 --- Purchase Entree:

     Burger - $5.99

     Pizza - $6.50

2 --- Purchase Drink:

     Water - $1.25

     Soda  - $1.50(Add $0.75 for Super Size)

3 --- Check out (Print Receipt)

0 --- Exit

***************************************************

Select an option: 0

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question