Project 3
answer:
code:
#include
using namespace std;
enum Type{GAS,DIESEL,ELECTRIC};
{
protected:
string make,model;
int year,odometer,type;
public:
automobile_maintenance()
{
cout<<"the make of the vehicle"<
cout<<"the model of the vechical"<
cout<<"the manufacturing year of vehicle"<
cout<<"the odometer reading in the vehicle"<
cout<<"the VEHICLE TYPE to choose\n choose 0 for GAS type\n choose 1 for DIESLE type choose 2 for ELECTRIC type"<
}
};
class maintenance : public automobile_maintenance
{ protected://it is a protected function in class
int t,c;
public://used to access the protected in main class
void checkTireRotation()//constructor details of the vehicles
{
cout<<"the information based on the tire rotation is: "<
{
cout<<"the car tire must be changed the life time is over"<
else
{
t=(50000-odometer);
cout<<"the tires is good condition \n After"<
}
void checkChargerPower()
{
cout<<"the information based on the battery usage: "<
{
cout<<"the battery must need be changed"<
else
{
c=(400-odometer);
cout<<"the battery is in good condition \n After"<
}
};
class car : public automobile_maintenance
{
protected://it is a protected function in class
int n;
public://used to access the protected in main class
void fun()//constructor details of the vehicles
{
cout<<"the information based on the customer vehicle: "<
switch(n)
{
case 0:
cout<<"GAS type vehicle came to service"<
case 1:
cout<<"DIESEL type vehicle came to service"<
case 2:
cout<<"ELECTICAL type vehicle came to service"<
default:
cout<<"invalid type of vehicle to select"<
}
}
};
int main()
{
int n;
maintenance m;
car c;
m.checkTireRotation();
m.checkChargerPower();
c.fun();
int y;
cin>>y;
switch(n)
{
case 0:
cout<<"thanks for doing service with us "<
case 1:
cout<<"the list of the inventory details have been uploaded in a proper manner"<
case 2:
cout<<"if you want to add the another vehicle bill means we can add it"<
case 3:
cout<<"the old parts has been replaced with the updated parts in the market"<
case 4:
cout<<"there is no vehicle is added in the list to remove"<
case 5:
cout<<"the rotation is in good condition"<
case 6:
cout<<"the oil tank in the car cleaned completely"<
case 7:
cout<<"as per the customer requirement the battery has changed to new version"<
}
}