Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.80 KB | None | 0 0
  1.  
  2. #include "Plane.h"
  3.  
  4. Plane::Plane()
  5. {
  6.  
  7. }
  8.  
  9. Plane::Plane(double wi, string p, string b, int n, int m, int w, double t, Engine *e)
  10. {
  11.     wingspan = wi;
  12.     planeType = p;
  13.     businessType = b;
  14.     numOfEngines = n;
  15.     maxOccupancy = m;
  16.  
  17.     numOfWheels = w;
  18.     topSpeed = t;
  19.     type = *e;
  20. }
  21.  
  22. Plane::~Plane()
  23. {
  24.  
  25. }
  26.  
  27. void Plane::print()
  28. {
  29.  
  30. }
  31.  
  32. void Plane::setWingspan(double wi)
  33. {
  34.     wingspan = wi;
  35. }
  36.  
  37. void Plane::setPlaneType(string p)
  38. {
  39.     planeType = p;
  40. }
  41.  
  42. void Plane::setBusinessType(string b)
  43. {
  44.     businessType = b;
  45. }
  46.  
  47. void Plane::setNumOfEngines(int n)
  48. {
  49.     numOfEngines = n;
  50. }
  51.  
  52. void Plane::setMaxOccupancy(int m)
  53. {
  54.     maxOccupancy = m;
  55. }
  56.  
  57. double Plane::getWingspan()
  58. {
  59.     return wingspan;
  60. }
  61.  
  62. string Plane::getPlaneType()
  63. {
  64.     return planeType;
  65. }
  66.  
  67. string Plane::getBusinessType()
  68. {
  69.     return businessType;
  70. }
  71.  
  72. int Plane::getNumOfEngines()
  73. {
  74.     return numOfEngines;
  75. }
  76.  
  77. int Plane::getMaxOccupancy()
  78. {
  79.     return maxOccupancy;
  80. }
  81.  
  82. /////////////////////////////
  83.  
  84.  
  85. #include "Rocket.h"
  86.  
  87. Rocket::Rocket()
  88. {
  89.     cargoLimit = 0;
  90.     numOfEngines = 0;
  91.     isSelfLanding = false;
  92. }
  93.  
  94. Rocket::Rocket(double c, int en, bool s, int w, double t, Engine *e)
  95. {
  96.     cargoLimit = c;
  97.     numOfEngines = en;
  98.     isSelfLanding = s;
  99.  
  100.     numOfWheels = w;
  101.     topSpeed = t;
  102.     type = *e;
  103. }
  104.  
  105. Rocket::~Rocket()
  106. {
  107.  
  108. }
  109.  
  110. void Rocket::print()
  111. {
  112.  
  113. }
  114.  
  115. void Rocket::setCargoLimit(double c)
  116. {
  117.     cargoLimit = c;
  118. }
  119.  
  120. void Rocket::setNumOfEngines(int en)
  121. {
  122.     numOfEngines = en;
  123. }
  124.  
  125. void Rocket::setIsSelfLanding(bool s)
  126. {
  127.     isSelfLanding = s;
  128. }
  129.  
  130. double Rocket::getCargoLimit()
  131. {
  132.     return cargoLimit;
  133. }
  134.  
  135. int Rocket::getNumOfEngines()
  136. {
  137.     return numOfEngines;
  138. }
  139.  
  140. bool Rocket::getIsSelfLanding()
  141. {
  142.     return isSelfLanding;
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement