Based
on the following class declaration answer the question
class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected
vehicle {
int diesel_petrol;
protected:
int load;
protected:
int load;
public:
voidread_data(float,float)
voidwrite_data(); };
class bus: private heavy_vehicle {
charTicket[20];
public:
voidfetch_data(char);
voiddisplay_data(); };
};
Which is the base class of the class
heavy_vehicle?
Based
on the following class declaration answer the question
class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected
vehicle {
int diesel_petrol;
protected:
int load;
protected:
int load;
public:
voidread_data(float,float)
voidwrite_data(); };
class bus: private heavy_vehicle {
charTicket[20];
public:
voidfetch_data(char);
voiddisplay_data(); };
};
The data member that can be accessed from the
function displaydata()
Based
on the following class declaration answer the question
class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected
vehicle {
int diesel_petrol;
protected:
int load;
protected:
int load;
public:
voidread_data(float,float)
voidwrite_data(); };
class bus: private heavy_vehicle {
charTicket[20];
public:
voidfetch_data(char);
voiddisplay_data(); };
};
The member function that can be accessed by an
objects of bus Class is
Based
on the following class declaration answer the question
class vehicle
{ int wheels;
public:
void input_data(float,float);
void output_data();
protected:
int passenger;
};
class heavy_vehicle : protected
vehicle {
int diesel_petrol;
protected:
int load;
protected:
int load;
public:
voidread_data(float,float)
voidwrite_data(); };
class bus: private heavy_vehicle {
charTicket[20];
public:
voidfetch_data(char);
voiddisplay_data(); };
class x
{ int a; public : x()
{}
};
class y
{ x x1; public : y(){} };
class z : public y,x
{
int b; public: z(){} }z1;
What
is the order of constructor for object z1 to be invoked?