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
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
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
Related questions
Concept explainers
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,