Question
Programming assignment: Classes and Inheritance You are to pick your own theme for a new Parent class. You can pick from one of the following:
Programming assignment: Classes and Inheritance
You are to pick your own theme for a new Parent class. You can pick from one of the following:
Person
Automobile
Animal
If you choose Person, you will create a subclass of Person called Student.
If you choose Automobile, you will create a subclass of Automobile called RaceCar
If you choose Animal, you will create a subclass of Animal called Horse
Once you pick your theme, you must use the HAS A question to determine the fields that you are going to include in your classes.
For example, an Alarm Clock HAS A:
Set Hours Button Time
Set Minutes Button Time
Set Hours Button Alarm
Set Minutes Button Alarm
Alarm On-Off Button
Snooze Button
You will create UMLs for all classes.
You will WRITE JAVA code to create the class from above. In the classes you are creating you will include at least three fields or attributes (See sample alarm clock above)
You will have overloaded methods, and overridden methods. You will label each. You will have a Testclass that creates at least 3 objects of each class.
Your parent and child classes need to have all necessary and required methods.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started