#include<iostream>
using namespace std;
class Vehicle
{
protected:
int wheel;int weight;
public:
Vehicle(int wh,int we):wheel(wh),weight(we){}
void show()
{cout<<"wheel="<<wheel<<" weight="<<weight<<endl;}
};
class Truck:protected Vehicle
{
int payload;
public:
Truck(int wh, int we, int pa) :Vehicle(wh, we)
{ payload=pa;}
void show()
{ cout<<"wheel="<<wheel<<" weight="<<weight<<" payload="<<payload<<endl;}
};
class Car:private Vehicle
{ int passengers;
public:
Car(int wh, int we, int pr) :Vehicle(wh, we)
{ passengers=pr;}
void show()
{ cout<<"wheel="<<wheel<<" weight="<<weight<<" passengers="<<passengers<<endl;}
};
class CarTruck:private Vehicle
{
int payload;
int passengers;
public:
CarTruck(int wh,int we,int pa ,int pr ):Vehicle(wh,we),payload(pa),passengers(pr){}
void show()
{ cout<<"wheel="<<wheel<<" weight="<<weight<<" passengers="<<passengers<<" payload="<<payload<<endl;}
};
void main()
{
Vehicle a(55,66);
a.show();
Truck b(55,99,45);
b
.show();
Car c(55,66,89);
c.show();
CarTruck d(12,54,78,45);
d.show();
}