-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vehicle.h
58 lines (52 loc) · 1.86 KB
/
Vehicle.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//=========================================================================================
// Vehicle domain model.
// A base abstract class for all kind of vehicles.
// Contains vehicle manufacturer properties.
//=========================================================================================
#pragma once
#include "Stdafx.h"
#include "PersistentEntity.h"
namespace vms
{
public ref class Vehicle abstract : public PersistentEntity
{
public:
// Available vehicle fuel types
enum class FuelType { GASOLINE, DIESEL, BIODIESEL, ELECTRICITY, ETHANOL, HYBRID, LIQUEFIED_PETROLEUM };
// Available vehicle transmission types
enum class Transmission { AUTOMATIC, SEMI_AUTOMATIC, MANUAL, ELECTRIC_VARIABLE, CONTINUOUSLY_VARIABLE };
protected:
Vehicle();
Vehicle(Vehicle^ vehicle);
public:
string getVIN();
string getMaker();
string getModel();
FuelType getFuelType();
Transmission getTransmission();
int getYearManufactured();
double getSweptVolume();
double getFuelTankCapacity();
string getColor();
void setVIN(const string vin);
void setMaker(const string maker);
void setModel(const string model);
void setFuelType(FuelType fuel);
void setTransmission(Transmission transmission);
void setYearManufactured(int year);
void setSweptVolume(double sweptVolume);
void setFuelTankCapacity(double tankCapacity);
void setColor(const string color);
string toString();
private:
string _vin; // vehicle identification number
string _maker;
string _model;
FuelType _fuelType;
Transmission _transmission;
int _yearManufactured;
double _sweptVolume; // car engine size
double _fuelTankCapacity; // fuel tank size
string _color;
};
}