-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigationSystem.cpp
More file actions
41 lines (34 loc) · 1.02 KB
/
Copy pathNavigationSystem.cpp
File metadata and controls
41 lines (34 loc) · 1.02 KB
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
////////////////////////////////
// Workfile : NavigationSystem.cpp
// Date : 19.12.2020
// Name : Sebastian Mueck
// Description : Concrete Decorator
////////////////////////////////
#include "NavigationSystem.h"
using namespace std;
static size_t const price = 20;
//assigns the Shared Ptr to mMotorVehicle
NavigationSystem::NavigationSystem(MotorVehicle::SPtr const& vehicle) : SpecialEquipment(vehicle)
{
}
//returns price of specific SpecialEquipment
size_t NavigationSystem::GetPrice() const
{
return price;
}
//Prints the SpecialEquipment and the extra price of it
void NavigationSystem::Print(std::ostream& ost) const
{
SpecialEquipment::Print(ost);
ost << endl << "\tNavigationssystem:\t +" << GetPrice() << " Euro";
}
//Needs to be implemented due to derivation of Base class
std::string NavigationSystem::GetManufacturer() const
{
return SpecialEquipment::GetManufacturer();
}
//Needs to be implemented due to derivation of Base class
std::string NavigationSystem::GetType() const
{
return SpecialEquipment::GetType();
}