Project 3
Abinaya Batch
Code
#include
#include
using namespace std;
#define size 2
#define MAXKM 50000
class vehicle
{
public:
string make,model,type;
enum Type{GAS, ELCTRIC,DIESEL};
int year;
float odometer;
virtual void setmake();
virtual void putmake();
virtual void setmodel();
virtual void putmodel();
virtual void setyear();
virtual void putyear();
virtual void setodometer();
virtual void putodometer();
};
} void displayservices()
void vehicle::setmake()
{
cout<<"Enter make of this vehicle"<
}
void vehicle :: putmake()
{
cout<<"\t"<
}
void vehicle::setmodel()
{
cout<<"\n Enter model of the vehicle"<
}
void vehicle::putmodel()
{
cout<<"\t"<
void vehicle::setyear()
{
cout<<"\n Enter manufactured year of the vehicle"<
}
void vehicle::putyear()
{
cout<<"\t"<
void vehicle::setodometer()
{
cout<<"\n Float data speedometer of the vehicle"<
}
void vehicle::putodometer()
{
cout<<"\t"<
cout<<"\n Tyre Rotation to be done "<
cout<<"\n Less than 50000 KMS -Tyre rotation can be done in next visit."<
void menudisplay()
{
cout<<"0. Quit.\n";
cout<<"1. displayservices.\n";
cout<<"2. Add vehicle.\n";
}
{
cout<<"\n oil change or replace oil filter,replace air filter "<
}
int main()
{
int user_choice;
beginning: menudisplay();
cout<<"Enter your choice in no"<
switch(user_choice)
{
case 0:cout <<"Existing the program ";
break;
case 1: displayservices();
goto beginning;
case 2:
vehicle *pv=new vehicle();
pv->setmake();
pv->setmodel();
pv->setyear();
pv->setodometer();
pv->putmake();
pv->putmodel();
pv->putyear();
pv->putodometer();
goto beginning;
}
}