Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

30. Which data structure is most commonly used to index databases?

Answered: 1 week ago

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago