Question: PYTHON: Demonstrate Inheritance 1) In the first step you will create a parent class. Create a parent class for Office Furniture. Set the class variables

PYTHON:

Demonstrate Inheritance

1) In the first step you will create a parent class. Create a parent class for Office Furniture. Set the class variables to be category (desk, chair, filing cabinet would be examples), material, length, width, height, and price. Include a method that returns a string about the object.

2. In the second step create a sub class for Desk that includes location_of_drawers (left, right both are options) and number_drawers. Override the parents __str__ method to include drawer location and count.

3. Implement each class in a separate file. Import these into your main program. Your main program should implement and display an instance of each, the parent class and the child class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!