-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.h
98 lines (47 loc) · 1.22 KB
/
Cargo.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once
#include "Time.h"
class Cargo
{
Time PreparationTime;
int LoadUnloadTime;
int DeliveryDistance;
int Cost;
Time CDT;
int TID;
Time WT;
//Instead of using polymorphism , and since the only difference between cargos is the cargo type
//we decided to add data member to indicate the type
char CargoType;
int ID;
public:
// CONSTRUCTORS
Cargo(Time Prep, int Load, int DD, int C,int id,char CT);
Cargo();
//-----------------------------------------------------//
// GETTERS
// fuction to return cargo type
char GetCT();
// fuction to return cargo ID
int GetID();
// fuction to return cargo cost
int GetCost();
// fuction to return cargo DeliveryDistance
int GetDeliveryDistance();
// fuction to return cargo PreparationTime
Time GetPreparationTime();
// fuction to return cargo LoadUnloadTime
int GetLoadUnloadTime();
//-----------------------------------------------------//
// SETTERS
// fuction to set cargo cost
void SetCost(int C);
// fuction to set CargoType
void SetCargoType(char CT);
int CalcPrio();
void SetCDT(Time Current);
Time GetCDT();
void SetTID(int tid);
int GetTID();
void SetWT(Time Wait);
Time GetWT();
};