-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotorcycle.cpp
30 lines (27 loc) · 1.42 KB
/
motorcycle.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "header.h"
using namespace std;
Motorcycle::Motorcycle(std::string brand, std::string model, int productionYear, std::string registrationNumber,
int horsePower, std::string fuelType, std::string gearboxType, std::string driveType,
int fuelConsumption, int engineSize, int topSpeed, std::string type, std::string brakeType)
: Vehicle(brand, model, productionYear, registrationNumber, horsePower, fuelType, gearboxType, driveType, fuelConsumption),
engineSize(engineSize),
topSpeed(topSpeed),
type(type),
brakeType(brakeType)
{
}
void Motorcycle::displayData() const {
cout << " Brand: " << brand << endl;
cout << " Model: " << model << endl;
cout << " Production year: " << productionYear << endl;
cout << " Registration number: " << registrationNumber << endl;
cout << " Horse power: " << horsePower << endl;
cout << " Fuel type: " << fuelType << endl;
cout << " Gearbox type: " << gearboxType << endl;
cout << " Drive type: " << driveType << endl;
cout << " Fuel consumption: " << fuelConsumption << endl;
cout << " Engine Size: " << engineSize << endl;
cout << " Top Speed: " << topSpeed << endl;
cout << " Type: " << type << endl;
cout << " Brake Type: " << brakeType << endl;
}