Challenge

Project 3

PROJECT 3:

#include
using namespace std;
#define size 2
#define MAXKM 50000

class vehicle
{public:
public:
string Make, model, type;
enum Type { GAS, ELECTRIC, 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 vehicle::setmake()
{
cout<<"Enter Make of thr vehicle"<
cin>>Make;
}
void vehicle::putmake()
{
cout<<"\t"<
}
void vehicle::setmodel()
{
cout<<"\n Enter model of the vehicle"<
cin>>model;
}
void vehicle::putmodel()
{
cout<<"\t"<
}
void vehicle::setyear()
{
cout<<"\n Enter manufactured yearofthe vehicle"<
cin>>year;
}
void vehicle::putyear()
{
cout<<"\t"<
}
void vehicle::setodometer()
{
cout<<"\n float data speedometer of the vehicle"<
cin>>odometer;
}
void vehicle::putodometer()
{
cout<<"\t"<
if(odometer>50000)
cout<<"\n Tyre Rotation to be done"<
else
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";
}
void displayservices()
{
cout<<"\n oil change or replace oil filter, replace air filter"<
cout<<"replace fuel filter,Tire Rotation,infotainment debug"<
cout<<"refill clutch fluid"<
cout<<"breake fluid, examine belts, wipers hoses"<
cout<<"check the Tire conditions,check the charging stystem, battery"<
}
int main()
{ int user_choice;
beginning:menudisplay();
cout<<"Enter your choice in no"<
cin>> user_choice;
switch(user_choice)
{
case 0 :cout <<"Exiting 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;


}
}

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.