Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a base class called Vehicle that has the manufacturer\'s name (type strin

ID: 3796653 • Letter: C

Question

Create a base class called Vehicle that has the manufacturer's name (type string), number of cylinders in the engine (type properties: load capacity in tons (type double since it may contain a decimal part) and towing capacity in pounds (type int). Be sure constructors and methods. Class Person is defined as: class Person {public: Person(); Person(string theName); Person(const Person& theObject); string getName() const: private: string name:} Include as a comment your name and the course code in each file. Each Class must be in a separate set of files (include Create a base class called Vehicle that has the manufacture's name (type string), number of cylinders in the engine (type int), and owner (type Person given below) Then create a class called Truck that is derived from Vehicle and has additional properties: load capacity in tons (type double since it may contain a decimal part) and towing capacity in pounds (type int). Be sure your classes have reasonable complement of constructors and accessor methods. Write a driver program that tests all constructors and methods Class Person is defined as class Person {public: Person(); Person(string theName); Person(const Person& theObject); string getName() const; private: string name:} Include as a comment you name and the course code in each file. Each Class must be in a separate set of tiles include file and cop file). Zip the files together and submit:

Explanation / Answer

Here goes the required code for the class 'Vehicle'

Code:

class Vehicle{
private:
String manufacture_name;
int number_of_cyliners;
double load_capacity;
int towing_capacity;
public Vehicle(){
this.manufacture_name="yamaha"; this.number_of_cyliners=3;
this.load_capacity=4.2;
this.towing_capacity=5;
}
public Vehicle(String manufacture_name,int number_of_cyliners,double load_capacity,int towing_capacity){
this.manufacture_name=manufacture_name;
this.number_of_cyliners=number_of_cylinders;
this.load_capacity=load_capacity;
this.towing_capacity=towing_capacity;
}
}

*class Vehicle is declared with given variables with private access scope

*Contructors are declared with public access type

*Both default constructor and parameterized constructors are written in the code