please help me asap Implement the design of the Laptop and Store classes so that the following  code generates the output below: print("Total Laptop Created:",Laptop.total_laptop) print("1.=========================================") s1 = Store() p1 = Laptop("Lenovo B4180", 55000) print("2.=========================================") p2 = Laptop("HP Pavilion") print("3.=========================================") s1.add_laptop(p1, p2) print("4.=========================================") p2.setPrice(77000) s1.add_laptop(p2) print("5.=========================================") s1.sell_laptop("HP Probook") print("6.=========================================") print(s1) print("7.=========================================") s2 = Store("Star Tech") p3 = Laptop("HP Probook", 58000) print("8.=========================================") p4 = Laptop("Lenovo Thinkpad", 60000) print("9.=========================================") p5 = Laptop("HP Elite", 80000) print("10.=========================================") s2.add_laptop(p3, p4, p5) print("11.=========================================") print(s2) print("12.=========================================") s2.sell_laptop("HP Probook") print("13.=========================================") print(s2) print("14.=========================================") print("Total Laptop Created:",Laptop.total_laptop) OUTPUT: Total Laptop Created: 0 1.========================================= Laptop created. Model: Lenovo B4180 Price: 55000 2.========================================= Laptop created. Model: HP Pavilion Price: Not Set 3.========================================= Lenovo B4180 model has been added to Ryans store. You can not add HP Pavilion without price 4.========================================= HP Pavilion model has been added to Ryans store. 5.========================================= HP Probook is not available at the Ryans store 6.========================================= Store Name: Ryans List of available Laptops: Model Name: Lenovo B4180 --> Price: 55000 Model Name: HP Pavilion --> Price: 77000 Total Laptop in Stock: 2 Total Price of Stocked Laptops: 132000 7.========================================= Laptop created. Model: HP Probook Price: 58000 8.========================================= Laptop created. Model: Lenovo Thinkpad Price: 60000 9.========================================= Laptop created. Model: HP Elite Price: 80000 10.========================================= HP Probook model has been added to Star Tech store. Lenovo Thinkpad model has been added to Star Tech store. HP Elite model has been added to Star Tech store. 11.========================================= Store Name: Star Tech List of available Laptops: Model Name: HP Probook --> Price: 58000 Model Name: Lenovo Thinkpad --> Price: 60000 Model Name: HP Elite --> Price: 80000 Total Laptop in Stock: 3 Total Price of Stocked Laptops: 198000 12.========================================= HP Probook has been sold at the price 58000 13.========================================= Store Name: Star Tech List of available Laptops: Model Name: Lenovo Thinkpad --> Price: 60000 Model Name: HP Elite --> Price: 80000 Total Laptop in Stock: 2 Total Price of Stocked Laptops: 140000 14.========================================= Total Laptop Created: 5

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please help me asap

Implement the design of the Laptop and Store classes so that the following 
code generates the output below:

print("Total Laptop Created:",Laptop.total_laptop)
print("1.=========================================")
s1 = Store()
p1 = Laptop("Lenovo B4180", 55000)
print("2.=========================================")
p2 = Laptop("HP Pavilion")
print("3.=========================================")
s1.add_laptop(p1, p2)
print("4.=========================================")
p2.setPrice(77000)
s1.add_laptop(p2)
print("5.=========================================")
s1.sell_laptop("HP Probook")
print("6.=========================================")
print(s1)
print("7.=========================================")
s2 = Store("Star Tech")
p3 = Laptop("HP Probook", 58000)
print("8.=========================================")
p4 = Laptop("Lenovo Thinkpad", 60000)
print("9.=========================================")
p5 = Laptop("HP Elite", 80000)
print("10.=========================================")
s2.add_laptop(p3, p4, p5)
print("11.=========================================")
print(s2)
print("12.=========================================")
s2.sell_laptop("HP Probook")
print("13.=========================================")
print(s2)
print("14.=========================================")
print("Total Laptop Created:",Laptop.total_laptop)

OUTPUT:
Total Laptop Created: 0
1.=========================================
Laptop created.
Model: Lenovo B4180
Price: 55000
2.=========================================
Laptop created.
Model: HP Pavilion
Price: Not Set
3.=========================================
Lenovo B4180 model has been added to Ryans store.
You can not add HP Pavilion without price
4.=========================================
HP Pavilion model has been added to Ryans store.
5.=========================================
HP Probook is not available at the Ryans store
6.=========================================
Store Name: Ryans
List of available Laptops:
Model Name: Lenovo B4180 --> Price: 55000
Model Name: HP Pavilion --> Price: 77000
Total Laptop in Stock: 2
Total Price of Stocked Laptops: 132000
7.=========================================
Laptop created.
Model: HP Probook
Price: 58000
8.=========================================
Laptop created.
Model: Lenovo Thinkpad
Price: 60000
9.=========================================
Laptop created.
Model: HP Elite
Price: 80000
10.=========================================
HP Probook model has been added to Star Tech store.
Lenovo Thinkpad model has been added to Star Tech store.
HP Elite model has been added to Star Tech store.
11.=========================================
Store Name: Star Tech
List of available Laptops:
Model Name: HP Probook --> Price: 58000
Model Name: Lenovo Thinkpad --> Price: 60000
Model Name: HP Elite --> Price: 80000
Total Laptop in Stock: 3
Total Price of Stocked Laptops: 198000
12.=========================================
HP Probook has been sold at the price 58000
13.=========================================
Store Name: Star Tech
List of available Laptops:
Model Name: Lenovo Thinkpad --> Price: 60000
Model Name: HP Elite --> Price: 80000
Total Laptop in Stock: 2
Total Price of Stocked Laptops: 140000
14.=========================================
Total Laptop Created: 5

Implement the design of the Laptop and Store classes so that the following
code generates the output below.
print("Total Laptop Created:",Laptop.total laptop)
print("1.=
s1 = Store()
p1 = Laptop("Lenovo B4180", 55000)
print("2.
p2 = Laptop("HP Pavilion")
print("3.=
=")
s1.add_laptop(p1, p2)
print("4.====
p2.setPrice(77000)
s1.add_laptop(p2)
print("5.-
s1.sell_laptop("HP Probook")
print("6.-
print(s1)
print("7.==
s2 = Store("Star Tech")
p3 = Laptop("HP Probook", 58000)
print("8.=
p4 = Laptop("Lenovo Thinkpad", 60000)
print("9.:
p5 = Laptop("HP Elite", 80000)
print("10.==
s2.add_laptop(p3, p4, p5)
print("11.
print(s2)
print("12.=
s2.sell_laptop("HP Probook")
print("13.
print(s2)
print("14.
print("Total Laptop Created:",Laptop.total_laptop)
Transcribed Image Text:Implement the design of the Laptop and Store classes so that the following code generates the output below. print("Total Laptop Created:",Laptop.total laptop) print("1.= s1 = Store() p1 = Laptop("Lenovo B4180", 55000) print("2. p2 = Laptop("HP Pavilion") print("3.= =") s1.add_laptop(p1, p2) print("4.==== p2.setPrice(77000) s1.add_laptop(p2) print("5.- s1.sell_laptop("HP Probook") print("6.- print(s1) print("7.== s2 = Store("Star Tech") p3 = Laptop("HP Probook", 58000) print("8.= p4 = Laptop("Lenovo Thinkpad", 60000) print("9.: p5 = Laptop("HP Elite", 80000) print("10.== s2.add_laptop(p3, p4, p5) print("11. print(s2) print("12.= s2.sell_laptop("HP Probook") print("13. print(s2) print("14. print("Total Laptop Created:",Laptop.total_laptop)
OUTPUT
Total Laptop Created: 0
1.==
Laptop oreatad.
Model: Lenovo B4180
Price 65000
2==
Laptop oreated.
Modet HP Pavilion
Prica Not Sat
Lanovo B4180 modal has baen addod to Ryans siore
You can not add HP Pavlion without price
4. ==
HP Pavilion model has bean added to Ryans ore.
HP Probook is not avalable at the Ryans stonro
6.==
Store Name Ryans
List of avalable Laptops
Modal Name Lenovo B4180 - Price: 5500
Model Name HP Pavlion Price: 77000
Tatal Laptop in Stack: 2
Total Price of Stocked Laptops. 132000
7.
Laptop oreatad.
Modet HP Probook
Price 58000
Laptop oreatod.
Model Lenovo Thinkpad
Price B0000
Laptop oreatod.
Model: HP EIte
Price: B0000
10
HP Probook model has boen addod to Star Toch store.
Lenovo Thinkpad model has boen added to Star Tach store.
HPEo modei has been added to Star Tach store
11.==
Slore Name: Star Tech
List of avalable Laptops
Model Name HP Probook - Price: 5BODO
Modal Nama Lenova Thinkpad --> Price BODD0
Model Name HP Elta Price: 80000
Total Laptop in Stock: 3
Tatal Price of Stocked Laptops 198000
12.
HP Probook has boen sold at the price Se00o
13.
Store Name: Star Tach
List of avalable Laptops
Model Name. Lenova Thinkpad -- Price. B00D0
Modei Nama HP Elta - Price: 8000
Total Laptop in Stock: 2
Total Price of Stocked Laptops 140000
14.
Total Laptop Croatod: 5
Transcribed Image Text:OUTPUT Total Laptop Created: 0 1.== Laptop oreatad. Model: Lenovo B4180 Price 65000 2== Laptop oreated. Modet HP Pavilion Prica Not Sat Lanovo B4180 modal has baen addod to Ryans siore You can not add HP Pavlion without price 4. == HP Pavilion model has bean added to Ryans ore. HP Probook is not avalable at the Ryans stonro 6.== Store Name Ryans List of avalable Laptops Modal Name Lenovo B4180 - Price: 5500 Model Name HP Pavlion Price: 77000 Tatal Laptop in Stack: 2 Total Price of Stocked Laptops. 132000 7. Laptop oreatad. Modet HP Probook Price 58000 Laptop oreatod. Model Lenovo Thinkpad Price B0000 Laptop oreatod. Model: HP EIte Price: B0000 10 HP Probook model has boen addod to Star Toch store. Lenovo Thinkpad model has boen added to Star Tach store. HPEo modei has been added to Star Tach store 11.== Slore Name: Star Tech List of avalable Laptops Model Name HP Probook - Price: 5BODO Modal Nama Lenova Thinkpad --> Price BODD0 Model Name HP Elta Price: 80000 Total Laptop in Stock: 3 Tatal Price of Stocked Laptops 198000 12. HP Probook has boen sold at the price Se00o 13. Store Name: Star Tach List of avalable Laptops Model Name. Lenova Thinkpad -- Price. B00D0 Modei Nama HP Elta - Price: 8000 Total Laptop in Stock: 2 Total Price of Stocked Laptops 140000 14. Total Laptop Croatod: 5
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY