Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Heli() :
  2. _x(0),
  3. _y(0),
  4. _z(0),
  5. max_height(0),
  6. min_height(0),
  7. max_load(0),
  8. _load(0)
  9. {
  10. }
  11.  
  12. void Add_Load(int last);
  13.  
  14. void Remove_Load(int last);
  15.  
  16. void Heli::Add_Load(int load) {
  17. _load += load;
  18.  
  19. if(_load != 0)
  20. {
  21. max_height = Heli.max_height / (_load*10);
  22. }
  23. }
  24.  
  25. int main()
  26. {
  27.  
  28. Heli a(100,-10,0,6000,0,300,0); // x,y,z-Position, max./min. Flightheight; max. Load, load
  29.  
  30. cout << "helicopter: " << a << endl << endl;
  31.  
  32. a.Add_Load(100);
  33. cout << a << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement