Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need help modifying a code (please include screenshots of your formatted code) Take the code from problem 9.3 (below) that you developed and

Hello I need help modifying a code (please include screenshots of your formatted code)

Take the code from problem 9.3 (below) that you developed and put each class into a separate file. Modify your original program and classes to import the files you just created and get everything working properly.

class Clothing:

def __init__(self,size,color,quantity=1):

self.size=size

self.color=color

self.quantity=quantity

def printAttributes(self):

print("Size is "+str(self.size))

print("Color is "+self.color)

def increaseQuantity(self,quantity):

self.quantity+=quantity

def decreaseQuantity(self,quantity):

self.quantity-=quantity

class ShirtInherit(Clothing):

def __init__(self,size,color,shirtType,message):

super().__init__(size,color) #pass size and color to parent class Clothing

self.shirtType=shirtType

self.message=message

def printMessage(self):

print("Message on the shirt is "+self.message)

shirt=ShirtInherit(35,"blue","long","You are awesome")

Thank You!!!!!

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 Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

How do information systems help businesses compete globally?

Answered: 1 week ago

Question

Know how to use reservations systems to inventory demand.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago