Answered step by step
Verified Expert Solution
Question
1 Approved Answer
FAST PLEASE Exercise 2 . Inheritance Extend the superclass defined in Exercise 1 to a subclass FormulaRider with the following private data members: a) modelEngine
FAST PLEASE
Exercise 2 . Inheritance Extend the superclass defined in Exercise 1 to a subclass FormulaRider with the following private data members: a) modelEngine (string), b) comp_distance (int) / competing distance, For this class, implement: - the appropriate constructors (with no-arguments, with argum. and copy constructor) - the appropriate get/set methods and overload the following methods: - print () which will print all the information about the FormulaRider in the following format: name: title: nr_tours. model: comp_distance - input () which inputs the data about the formulaRider. In the main() method class: - implement a method modelferrari() to accept an array of FormulaRiders and return an array/list of the FormulaRiders with the model of the engine "Ferrari". - implement a method riders_SpecificDistance () to accept an array of FormulaRiders and return an array/list of FormulaRiders that hold the title "champion" and have at least 20km competing distance. - In the main method: create an array of FormulaRiders; input the data about each FormulaRider print the data of the FormulaRiders with the model of the engine "Ferrari". print the data about the riders that hold the title "champion" and have at least 20km competing distance. Exercise 2 . Inheritance Extend the superclass defined in Exercise 1 to a subclass FormulaRider with the following private data members: a) modelEngine (string), b) comp_distance (int) / competing distance, For this class, implement: - the appropriate constructors (with no-arguments, with argum. and copy constructor) - the appropriate get/set methods and overload the following methods: - print () which will print all the information about the FormulaRider in the following format: name: title: nr_tours. model: comp_distance - input () which inputs the data about the formulaRider. In the main() method class: - implement a method modelferrari() to accept an array of FormulaRiders and return an array/list of the FormulaRiders with the model of the engine "Ferrari". - implement a method riders_SpecificDistance () to accept an array of FormulaRiders and return an array/list of FormulaRiders that hold the title "champion" and have at least 20km competing distance. - In the main method: create an array of FormulaRiders; input the data about each FormulaRider print the data of the FormulaRiders with the model of the engine "Ferrari". print the data about the riders that hold the title "champion" and have at least 20km competing distance 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