Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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