Question: Consider the following code. Is there a syntax error, and if so , what is it ? class Car { public: Car ( double tank

Consider the following code. Is there a syntax error, and if so, what is it?
class Car
{
public:
Car(double tank_siz);
double get_tankSize() const;
void set_tankSize(double size);
private:
double tank_size;
};
class Chevy : car
{
public:
Chevy();
double get_mpg() const;
void add_miles(double miles);
private:
double engine_size;
double miles_travelled;
};
Question 15 options:
No syntax error, but a main() using the Chevy class will not be able to call get_tankSize()
No syntax error and no design problems
The parameter is spelled wrong in the prototype for Car (double tank_siz);. It doesn't match the private variable name.
None of these

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 Programming Questions!