1. Xperience IRA 10th May 2021
Python: Toy and Discount
Create a class Toy with attributes:
toyld Number
toyBrand String
toyType String
price Number
ho
Define the init method which takes
parameters in above sequence and sets
the values for attributes toyld, toy Brand
toyType, price.
Create another class ShowRoom with
attribute as below:
toyList of type list which has List on
Toy Objects
Define the
method to
attributes in the above sequence
Create another method
with name
Answers
Answered by
1
Answer:
I know this question
Answered by
1
Xperience IRA 10th May 2021
Explanation:
class toy:
toyld = 0
toyBrand = ""
toyType = ""
price = ""
def _init_(self,toyId, toyBrand, toyType, price ) :
self.toyld = toyId
self.toyBrand = toyBrand
self.toyType = toyType
self.price = price
class ShowRoom:
toyList = []
Similar questions