Website Summary Files Commits Branches @commit @diff @stats
path: root / Week08 / Exercise01 / RocketStage.h
blob: 8109e70954aaea158215d039b1c73ae302393d96 (plain) (blame)
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
#ifndef _ROCKET_STAGE
#define _ROCKET_STAGE

class RocketStage {
	char name[101];
	unsigned height; // Метри
	double weight; // Килограми
	double liftForce; // Нютони
	unsigned burnTime; // Секунди

	double acceleration(double payloadWeight) const;

public:
	const char* GetName() const;
	void SetName(const char* name);

	unsigned GetHeight() const;
	void SetHeight(unsigned height);

	double GetWeight() const;
	void SetWeight(double weight);

	double GetLiftForce() const;
	void SetLiftForce(double liftForce);

	unsigned GetBurnTime() const;
	void SetBurnTime(unsigned burnTime);

	double Speed(double payloadWeight) const;
	double DistanceTravel(double payloadWeight) const;
};

#endif /* _ROCKET_STAGE */