Question: Study the following code snippet: class Car { public: Car ( ) ; Car ( double new _ speed ) ; void set _ speed

Study the following code snippet:
class Car
{
public:
Car();
Car(double new_speed);
void set_speed(double new_speed);
double get_speed() const;
private:
double speed;
};
class AeroCar : public Car
{
public:
AeroCar();
AeroCar(double new_height);
AeroCar(double new_height, double new_speed);
void set_height(double new_height);
double get_height() const;
private:
double height;
};
public AeroCar::AeroCar(double new_height, double new_speed)
: Car(new_speed)
{
height = new_height;
}
int main()
{
AeroCar acar1(2000.0,200.0);
return 0;
}
Which one of the following functions of the Car class is called by this statement?
AeroCar acar1(2000.0,200.0);
Question 9 options:
Car()
Car(double new_speed)
void set_speed(double new_speed)
double get_speed() const

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!