-
Notifications
You must be signed in to change notification settings - Fork 0
/
Freighter.h
63 lines (46 loc) · 1.03 KB
/
Freighter.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
//
// Created by Admin on 6/18/2021.
//
#ifndef UNTITLED2_FREIGHTER_H
#define UNTITLED2_FREIGHTER_H
#include "Model.h"
class Freighter: public Ship {
public:
Freighter(const string &name, const Point &position, const int &resistance,
int container = 0) :
Ship(name, position, freighter), _containers(container), _fuel(
FREIGHTER_FUEL_TANK_CAPACITY), _resistance(resistance) {
}
virtual void update();
void concreteStatus();
void refuel(const double &fuel);
void dock();
void load(const int &containers);
void unload(const int &containers);
void status() override;
virtual ~Freighter() {
}
int getContainers() const {
return _containers;
}
void setContainers(int containers) {
_containers = containers;
}
double getFuel() const {
return _fuel;
}
void setFuel(double fuel) {
_fuel = fuel;
}
int getResistance() const {
return _resistance;
}
void setResistance(int resistance) {
_resistance = resistance;
}
private:
int _containers;
double _fuel;
int _resistance;
};
#endif //UNTITLED2_FREIGHTER_H