In Vehicle class: Fix two errors in header file Identify the type of constructors in the comments of the declaration file.

Vehicle.h

//This class implements encapsulation and data hiding to gather information about the Vehicle attributes. The gathered information is used to determine whether the vehicle is under warranty and the results are displayed.
#pragma once
#include
#include “ivehicle.h”
using namespace std;

class vehicle : public ivehicle
{
private:
static int numVehicles;
protected:
string make;
int year;
double mileage;
warranty war;
public:
vehicle();
~vehicle();
vehicle(string m, int y, double d, warranty);
string getMake();
int getYear();
double getMileage();
void setMake(string);
void setYear(int);
void setMileage(double);
void displayVehicle();
vehicle(vehicle &);
void setYear(string);
void setMileage(string);
static int getVehicleNumber();
warranty getWarranty();
void setWarranty(warranty &);
void checkwarranty();
}

Vehicle.cpp

#include “vehicle.h”
#include
#include
#include
using namespace std;

int vehicle::numVehicles = 0;

//What kind of constructor is this?
vehicle::vehicle()
{
make = “unknown”;
year = 0;
mileage = 0;
numVehicles++;
war = warranty();
}

//What kind of constructor is this?
vehicle::vehicle(string m, int y, double d, warranty w)
{
make = m;
year = y;
mileage = d;
numVehicles++;
war = w;
}

//What kind of constructor is this?
vehicle::vehicle(vehicle &obj)
{
make = obj.make;
year = obj.year;
mileage = obj.mileage;
numVehicles++;
war = obj.war;
}

vehicle::~vehicle()
{
numVehicles–;
}

string vehicle::getMake()
{
return make;
}

int vehicle::getYear()
{
return year;
}

double vehicle::getMileage()
{
return mileage;
}

void vehicle::setMake(string m)
{
make = m;
}

void vehicle::setYear(int y)
{
year = y;
}

void vehicle::setMileage(double d)
{
mileage = d;
}

void vehicle::setYear(string y)
{
year = atoi(y.c_str());
}

void vehicle::setMileage(string d)
{
mileage = atof(d.c_str());
}

void vehicle::displayVehicle()
{
cout
cout
cout
war.displayWarranty();
checkwarranty();
}

int vehicle::getVehicleNumber()
{
return numVehicles;
}

warranty vehicle::getWarranty()
{
return war;
}

void vehicle::setWarranty(warranty &w)
{
war = w;
}

void vehicle::checkwarranty()
{
int currentYear = 2017;
int check = currentYear – year;
if (check
cout
else
cout
}

ivehicle.h

class ivehicle
{
   virtual void checkwarranty() = 0;
};

"Get 15% discount on your first 3 orders with us"
Use the following coupon
"FIRST15"

Order Now