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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply