Complete the code to declare a class named Car.
class [1] { public: void drive() {} };
The class name should be Car as specified.
Complete the code to create an object named myCar of class Car.
Car [1];The object name should be myCar as requested.
Fix the error in the code to access the drive method using the object myCar.
myCar.[1]();The method name is drive exactly as declared in the class.
Fill both blanks to define a class Person with a private age and a public method to get age.
class Person { private: int [1]; public: int [2]() { return age; } };
The private variable is named age and the public method to get it is getAge.
Fill all three blanks to implement inheritance where Student inherits from Person and adds a method to get grade.
class Student : public [1] { public: int [2]() { return grade; } private: int [3]; };
Student inherits from Person. It has a method getGrade and a private variable grade.
