Order process: To place an order, the customer details (ID, name, phone, address) must be known. Customers need to have an address as illustrated. The pastry shop owner then starts taking the order of that customer (1 or more bakeables). Bakeables can be added one by one or as a list. The BakesOrder class calculate and prints all the order details. Fatayer f = new Fatayer(FatayerType.CHEESE); StuffedCrust tc3 = new StuffedCrust("Supreme Cheese", BakeSize. LARGE); tc3.addTopping(Topping.ONION); tc3.addTopping(Topping.CHEESE); Address a1 = new Address (45, 70, "Wadi Albanat"); Customer cust1= new Customer(100, "Ali Hassan Abdulla", "66779988"); cust1.setAddress (a1); BakesOrder bo1 = new BakesOrder(123, cust1); bo1.addBakeable(tc3); bo1.addBakeable(f); System.out.println(bo1); Date: Mon Mar 29 23:56:13 AST 2021 ID: 123 Items: 2 Total Price: 52.0 Customer ID:100, Name: Ali Hassan Abdulla, Phone: 66779988 Address: 45, Wadi Albanat, ZONE: 70 -- ORDER DETAILES (1) --- Stuffed Crust Pizza: Supreme Cheese, size:LARGE Toppings (2): ONION CHEESE Weight (Grams):1120.0, Calories: 1480.0, Price:43.0 (2) FATAYER: CHEESE, Price:9.0, Weight:240.0, Calories: 300.0 ThickCrust

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
icon
Related questions
Question
100%
Order process:
To place an order, the customer details (ID, name, phone, address) must be known. Customers
need to have an address as illustrated. The pastry shop owner then starts taking the order of that
customer (1 or more bakeables). Bakeables can be added one by one or as a list. The BakesOrder
class calculate and prints all the order details.
Fatayer f = new Fatayer(FatayerType.CHEESE);
StuffedCrust tc3 = new StuffedCrust("Supreme Cheese", BakeSize.LARGE);
tc3.addTopping(Topping.ONION); tc3.addTopping(Topping.CHEESE);
Address a1 = new Address (45, 70, "Wadi Albanat");
Customer cust1= new Customer(100, "Ali Hassan Abdulla", "66779988");
cust1. setAddress(a1);
BakesOrder bo1 = new BakesOrder(123, cust1);
bo1.addBakeable(tc3); bo1.addBakeable(f);
System.out.println(bo1);
Date: Mon Mar 29 23:56:13 AST 2021 ID: 123 Items: 2 Total Price: 52.0
Customer ID:100, Name: Ali Hassan Abdulla, Phone: 66779988
Address: 45, Wadi Albanat, ZONE: 70
ORDER DETAILES
(1)
---
---
Stuffed Crust Pizza: Supreme Cheese, size:LARGE
Toppings (2): ONION CHEESE
Weight (Grams):1120.0, Calories: 1480.0, Price:43.0
(2) FATAYER: CHEESE, Price:9.0, Weight:240.0, Calories: 300.0
ThickCrust
Transcribed Image Text:Order process: To place an order, the customer details (ID, name, phone, address) must be known. Customers need to have an address as illustrated. The pastry shop owner then starts taking the order of that customer (1 or more bakeables). Bakeables can be added one by one or as a list. The BakesOrder class calculate and prints all the order details. Fatayer f = new Fatayer(FatayerType.CHEESE); StuffedCrust tc3 = new StuffedCrust("Supreme Cheese", BakeSize.LARGE); tc3.addTopping(Topping.ONION); tc3.addTopping(Topping.CHEESE); Address a1 = new Address (45, 70, "Wadi Albanat"); Customer cust1= new Customer(100, "Ali Hassan Abdulla", "66779988"); cust1. setAddress(a1); BakesOrder bo1 = new BakesOrder(123, cust1); bo1.addBakeable(tc3); bo1.addBakeable(f); System.out.println(bo1); Date: Mon Mar 29 23:56:13 AST 2021 ID: 123 Items: 2 Total Price: 52.0 Customer ID:100, Name: Ali Hassan Abdulla, Phone: 66779988 Address: 45, Wadi Albanat, ZONE: 70 ORDER DETAILES (1) --- --- Stuffed Crust Pizza: Supreme Cheese, size:LARGE Toppings (2): ONION CHEESE Weight (Grams):1120.0, Calories: 1480.0, Price:43.0 (2) FATAYER: CHEESE, Price:9.0, Weight:240.0, Calories: 300.0 ThickCrust
<<Java Class>>
©Address
model
o houseNo: int
O zone: int
o streetName: String
-address
S'Address(int,int, String)
0.1
o getHouseNo():int
O setHouseNo(int) void
o getZone():int
O setZone(int).void
o getStreetName():String
O setStreetName(String):void
o toString():String
Transcribed Image Text:<<Java Class>> ©Address model o houseNo: int O zone: int o streetName: String -address S'Address(int,int, String) 0.1 o getHouseNo():int O setHouseNo(int) void o getZone():int O setZone(int).void o getStreetName():String O setStreetName(String):void o toString():String
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,