Page 1 of 1

The script must define two classes Baseball_Card is a subclass of Collectable Collectable Collectable must have the foll

Posted: Thu May 05, 2022 12:41 pm
by answerhappygod
The script must define two classes
Baseball_Card is a subclass of Collectable
Collectable
Collectable must have the following attributes
All attributes must be hidden.
purchased and price must be stored as integers.
Collectable must have the following methods
__str__ must return a string containing all attributes.
Baseball_Card
Baseball_Card must have the following attributes.
All attributes must be hidden.
year and must be stored as an integer.
Baseball_Card must have the following methods
__str__ must return a string containing all attributes.
Script for this assignment
Open an a text editor and create the file hw11.py.
You can use the editor built into IDLE or a program like
Sublime.
Test Code
Your hw11.py file must contain the following
test code at the bottom of the file:
Suggestions
Write this program in a step-by-step fashion using the technique
of incremental development.
In other words, write a bit of code, test it, make whatever
changes you need to get it working, and go on to the next step.