Question: 2 Implement the design of the Purchaser and AarongProducts classes so that  the following code generates the output below: #Write your code here p1 = Purchaser('Alex Light') print('1.===============================') print(p1) product1 = AarongProducts('Decor', 'Photo-Frame') print('2.===============================') print(product1) print('3.===============================') print(AarongProducts.products) print('4.===============================') AarongProducts.include_products('Souvenirs',['Brass-Flowervase  2170', 'Terracotta-Vase 3500']) print(f'Updated Item List:\n{AarongProducts.products}') print('5.===============================') product2 = AarongProducts('Souvenirs', 'Terracotta-Vase', 2) print(product2) print('6.===============================') p1.create_invoice(product1, product2) print('7.===============================') product3 = AarongProducts('Decor', 'Candles', 5) print(product3) print('8.===============================') product4 = AarongProducts('Souvenirs', 'Brass Sail-boats', 2) print(product4) print('9.===============================') p2 = Purchaser('Emma Lord', 'M01-23') print(p2) print('10.==============================') p2.create_invoice(product1, product3, product4) OUTPUT: 1.=============================== Customer SL no.: 1 Customer Name: Alex Light Registered Customer ID: None 2.=============================== Products Order Details: 1 Photo-Frame. 3.=============================== {'Decor': {'Small-Mirror': 1110, 'Photo-Frame': 1240, 'Candles':  350}, 'Souvenirs': {'Brass Sail-boats': 2200}} 4.=============================== Updated Item List: {'Decor': {'Small-Mirror': 1110, 'Photo-Frame': 1240, 'Candles':  350}, 'Souvenirs': {'Brass Sail-boats': 2200, 'Brass-Flowervase':  2170, 'Terracotta-Vase': 3500}} 5.=============================== Products Order Details: 2 Terracotta-Vase. 6.=============================== Total Bill of Alex Light: 8240.0 Tk. 7.=============================== Products Order Details: 5 Candles. 8.=============================== Products Order Details: 2 Brass Sail-boats. 9.=============================== Customer SL no.: 2 Customer Name: Emma Lord Registered Customer ID: M01-23 Registered Customer will get 10% discount 10.============================== Total Bill of Emma Lord: 6651.0 Tk.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
Question: 2 Implement the design of the Purchaser and AarongProducts classes so that  the following code generates the output below: #Write your code here p1 = Purchaser('Alex Light') print('1.===============================') print(p1) product1 = AarongProducts('Decor', 'Photo-Frame') print('2.===============================') print(product1) print('3.===============================') print(AarongProducts.products) print('4.===============================') AarongProducts.include_products('Souvenirs',['Brass-Flowervase  2170', 'Terracotta-Vase 3500']) print(f'Updated Item List:\n{AarongProducts.products}') print('5.===============================') product2 = AarongProducts('Souvenirs', 'Terracotta-Vase', 2) print(product2) print('6.===============================') p1.create_invoice(product1, product2) print('7.===============================') product3 = AarongProducts('Decor', 'Candles', 5) print(product3) print('8.===============================') product4 = AarongProducts('Souvenirs', 'Brass Sail-boats', 2) print(product4) print('9.===============================') p2 = Purchaser('Emma Lord', 'M01-23') print(p2) print('10.==============================') p2.create_invoice(product1, product3, product4) OUTPUT: 1.=============================== Customer SL no.: 1 Customer Name: Alex Light Registered Customer ID: None 2.=============================== Products Order Details: 1 Photo-Frame. 3.=============================== {'Decor': {'Small-Mirror': 1110, 'Photo-Frame': 1240, 'Candles':  350}, 'Souvenirs': {'Brass Sail-boats': 2200}} 4.=============================== Updated Item List: {'Decor': {'Small-Mirror': 1110, 'Photo-Frame': 1240, 'Candles':  350}, 'Souvenirs': {'Brass Sail-boats': 2200, 'Brass-Flowervase':  2170, 'Terracotta-Vase': 3500}} 5.=============================== Products Order Details: 2 Terracotta-Vase. 6.=============================== Total Bill of Alex Light: 8240.0 Tk. 7.=============================== Products Order Details: 5 Candles. 8.=============================== Products Order Details: 2 Brass Sail-boats. 9.=============================== Customer SL no.: 2 Customer Name: Emma Lord Registered Customer ID: M01-23 Registered Customer will get 10% discount 10.============================== Total Bill of Emma Lord: 6651.0 Tk.
Expert Solution
steps

Step by step

Solved in 7 steps with 4 images

Blurred answer
Knowledge Booster
Data members
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage