ulvis.paste.net

Paste Search Dynamic
Recent pastes
StarShip
  1. #include <iomanip>
  2. #include "StarShip.h"
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.         int             closeProgram = 0;
  9.  
  10.         string  Name;
  11.         int             maxVelocity;
  12.         int             crewSize;
  13.         double  displacement;
  14.  
  15.         StarShip starship;
  16.  
  17.         cout << "\n\tEnter StarShip specifications" << endl;
  18.         cout << "---------------------------------------------" << endl;
  19.         cout << "Name: ";
  20.         getline(cin, Name);
  21.         starship.setName(Name);
  22.  
  23.         cout << "Max Velocity (kilometers per hours): ";
  24.         cin >> maxVelocity;
  25.         starship.setmaxVelocity(maxVelocity);
  26.  
  27.         cout << "Crew Size: ";
  28.         cin >> crewSize;
  29.         starship.setcrewSize(crewSize);
  30.  
  31.         cout << "Displacement (metric ton): ";
  32.         cin >> displacement;
  33.         starship.setdisplacement(displacement);
  34.  
  35.         starship.displayInfo();
  36.  
  37.         cout << "\n\nEnter the integer zero and press enter to close the program: ";
  38.         cin >> closeProgram;
  39. }
Parsed in 0.007 seconds