Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Identify Porter's generic strategies

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago