Implement the following classes. Assume having a club that provides two racing games: car racing and horse racing. Racin

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Implement the following classes. Assume having a club that provides two racing games: car racing and horse racing. Racin

Post by answerhappygod »

Implement The Following Classes Assume Having A Club That Provides Two Racing Games Car Racing And Horse Racing Racin 1
Implement The Following Classes Assume Having A Club That Provides Two Racing Games Car Racing And Horse Racing Racin 1 (58.85 KiB) Viewed 33 times
Implement the following classes. Assume having a club that provides two racing games: car racing and horse racing. RacingGame teaml:String team2:String +RacingGame(t1:String, 12: String) + toString(): String + getter/setters() 4 type1: String Horses: Hourse [] Horse name: String age: int . - yearl String . type2: String . year2 String + HorseRace(All parameters) +getHorsel(): Horse + getHorse2(): Horse +toString(): String + Horse (All parameters) + getName(): String + getAge(): int + CaRace(All parameters) + toString(): String + getters/setters() A. RacingGame class is characterized by two String attributes team/ and team2. This class has as methods: A constructor that initializes the attributes. [5 pts] ● • A toString method that returns the information in the form TeamNamel vs TeamName2. [5 pts] getter/setter methods. [5 pts] B. The CarRace class that inherits from RacingGame. It has four String attributes the type (e.g. Honda) and the year (e.g. 1998) of the first team and those of the second team. This class has as methods: ● A constructor that initializes all attributes. [5 pts] . A toString method that returns the information in the following form. [5 pts] TeamNamel vs TeamName2 Honda 1998 vs BMW 1997 ● getter/setter methods. [5 pts] CarRace HorseRace
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply