E.balagurusamy oop 6.7 solution
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
class car
{
int front_seat;
int back_seat;
int speeds;
public :
car(int x)
{
speeds=x;
}
car(int y,int z)
{
front_seat=y;
back_seat=z;
}
void seat()
{
cout<<"fornt seat : "<<front_seat<<endl;
cout<<"Back seat : "<<back_seat<<endl;
}
void speed()
{
cout<<"speed : "<<speeds<<endl;
}
};
int main()
{
car ob(60),ob1(10,20);
ob1.seat();
ob.speed();
return 0;
}
0 Comments