Answered step by step
Verified Expert Solution
Question
1 Approved Answer
***IN JAVA*** Develop a class Horse.java. The class should have the private variables: name, color, and birthYear. The class should have a default constructor and
***IN JAVA*** Develop a class Horse.java. The class should have the private variables: name, color, and birthYear. The class should have a default constructor and a non-default constructor which accepts values for name, color, and birthYear You should have the appropriate getters and setters. The setter method for birthYear should not accept a value 2018 (it will trap the user until a valid amount is entered by the user). The class should have a toString and an equals method Develop a class RaceHorse.java which is a child of the class Horse.java. The class should have the private variables: races, and wins. The class should have a default constructor and a non-default constructor which accepts values for races, and wins. You should have the appropriate getters and setters. The setter method for races should not accept a value
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