- Use Inheritance To Create The Following Tree Furniture Types Seating O O Sleeping O Bed O Futon Tables Chair Bean Bag O 1 (255.69 KiB) Viewed 26 times
Use inheritance to create the following tree. Furniture types Seating O O Sleeping O Bed O Futon Tables Chair Bean bag O
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Use inheritance to create the following tree. Furniture types Seating O O Sleeping O Bed O Futon Tables Chair Bean bag O
Use inheritance to create the following tree. Furniture types Seating O O Sleeping O Bed O Futon Tables Chair Bean bag O Desk O Workbench Storage O Cupboard O Coat rack Then, in main, create a function that will take in a type of furniture and return the inheritance chain C:/Users/pamel/PycharmProjects/furniture/furniture.py Please enter the type of furniture: Chair Chair is a type of Seating which is a piece of Furniture C:/Users/pamel/PycharmProjects/furniture/furniture.py Please enter the type of furniture: Cupboard Cupboard is a type of Storage which is a piece of Furniture This is the code that created that output: print(c.item, "is a type of", c.subtype, "which is a piece of", c.struct)