Question: 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

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!