Question: Create a file named game.py and define a class named Game that inherits from InventoryItem. The Game class has one additional public instance variables, a
Create a file named game.py and define a class named Game that inherits from InventoryItem. The Game class has one additional public instance variables, a string called upc.
Just as you did with the Book class, override the superclass init getiteminput, and str methods to perform appropriate actions for this class.
Make sure the init method sets the category for this object to be "Game".
Make sure your getiteminput method does data validation to ensure the UPC entered by the user is a string with digits.
If this object is created directly, here's what it should look like:
Monopoly
Count: Cost:
Category: Game
UPC:
Wherever possible, your program should call the super function to access methods from the base class to avoid copying code from the base class module
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
