Question: Question 6 ( 1 0 points ) In a car rental application, the following car class interface is defined. One of the programmers discovers a
Question points
In a car rental application, the following car class interface is defined. One of the programmers discovers a bug in the void accelerate double speed function. She corrects the bug by modifying the code snippet in the implementation of the Car class accelerate function. What must be changed in the interface?
class Car
public:
void start;
void acceleratedouble speed;
void stop;
double getspeed const;
private:
double speed;
;
The acceleratedouble speed declaration must be updated.
A new private acceleration data member must be added.
The accelerate function must be declared as void acceleratedouble acceleration
No change is required in the interface because only the implementation was modified.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
