22 double tankMaxCapacity;
23 double tankInitialCapacity;
24 double tankCurrentCapacity;
25 double tankStateOfCapacity;
27 double tankCumConsumedFuel = 0.0;
39 void SetTank(
double maxCapacity,
double initialCapacityPercentage,
double depthOfDischarge);
double getTankDOD() const
Gets the depth of discharge of the tank.
Definition tank.cpp:40
void SetTank(double maxCapacity, double initialCapacityPercentage, double depthOfDischarge)
Set the main properties of the tank (initialize the tank)
Definition tank.cpp:64
bool isTankDrainable(double consumedAmount)
Checks if the specified amount of fuel is drainable from the tank.
Definition tank.cpp:36
double consumeTank(double consumedAmount)
Consumes fuel from the tank.
Definition tank.cpp:24
bool tankHasFuel()
Checks if the tank has fuel (current capacity > 0)
Definition tank.cpp:60
double getTankInitialCapacity() const
Gets the initial capacity of the tank.
Definition tank.cpp:12
double getTankStateOfCapacity() const
Gets the state of capacity of the tank.
Definition tank.cpp:32
void setTankMaxCapacity(double newMaxCapacity)
Sets the maximum capacity of the tank.
Definition tank.cpp:8
void setTankInitialCapacity(double newInitialCapacityPercentage)
Sets the initial capacity of the tank.
Definition tank.cpp:16
void setTankDOD(double newTankDOD)
Sets the depth of discharge of the tank.
Definition tank.cpp:44
double getTankCumConsumedFuel() const
Gets the total amount of fuel consumed from the tank.
Definition tank.cpp:56
double getTankCurrentCapacity() const
Gets the current capacity of the tank.
Definition tank.cpp:20
double getTankMaxCapacity() const
Gets the maximum capacity of the tank.
Definition tank.cpp:4