Complete the code to declare a class named Car.
class [1] { public: int speed; };
The class name should be Car to match the declaration.
Complete the code to create an object named myCar of class Car.
Car [1];The object name should be myCar as specified.
Fix the error in the code to access the speed attribute of myCar.
myCar.[1] = 100;
The attribute name is speed and accessed without parentheses.
Fill both blanks to define a method named accelerate that increases speed by 10.
void [1]() { speed [2] 10; }
The method name is accelerate and the operator to increase speed is +=.
Fill all three blanks to create an object and call its accelerate method.
Car [1]; [2].speed = 50; [3]();
The object is named myCar, so use it to set speed and call the method accelerate with dot notation.
