Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For this project, you will create a text-based game. The game will display a wel

ID: 641795 • Letter: F

Question

For this project, you will create a text-based game. The game will display a welcome message, present a problem and make a simple calculation and display the results.

Read the Style Guide before beginning this project. plese write programme in C++

Minimum Requirements:

Create a class called gork. Your class must hold these private variables in the private area of your class (4 points):
   double team0;
   double team1;
   double assist;
   double tanks;

Your class must have public functions to handle each of these requirements:

welcome function to welcome the player (4 points)
   1. Display a welcome message:
   2. Display the copyright year
   3. Display "Created by [your name here]"
   4. Display the background story that includes the following information (format for display however you would like):

You are in charge of a team of researchers on the largest moon of planet Gork. One team member finds toxic mineral. The toxic material begins to corrode the oxygen tanks. Oxygen levels begin to drop.

   5. Ask the player to enter the number of team members for the initial team of researchers (store this in the variable team0)

setData function for data initialization and calculation (8 points). The user must make a choice:

Option 1. Make an emergency launch to return to base. If this option is selected, display this message: "The toxic material has corroded the launch gear and the launch exploded."

Option 2. Secure the area with non-corrosive shielding from the lunar vehicles and request an emergency rescue for the number of team members with corroded oxygen tanks.   If this option is selected, set each of your variables to hold a valid value:
        a. The number of team members to be evacuated (store the results in the variable team1)
b. Calculate the total number of tanks required for the remaining team members. Store the results in the tanks variable first, then display the tanks value.

Option 3. Request emergency resupply of non-corrosive oxygen tanks from base. If this option is selected, set each of your variables to hold a valid value:
   a. The number of requested team members to assist team0 (store this in the variable assist)
       b. Calculate the total number of non-corrosive tanks required for both team0 and assist. Store the results in the tanks variable first, then display the tanksvalue.

If the user selects anything other than options 1, 2 or 3 the game should display "You have been eaten by a Grue."

Your output might look similar to the following. Your output may differ in the text that is displayed, the formatting of the text and the actual values that are calculated as long as the game works as described above. The example below displays the results when option 2 is selected.

Explanation / Answer

Feel free to add any features onto it.

It is just code for text based game and it has been tested just compile it in the GCC compiler and it should work.

  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  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137  138  
  #include <iostream>  #include <ctime>  #include <cstdlib>    using namespace std;    class scenario;              class scenario  {          public:    //Scenario 1  int scenario_a () {              cout << "  1";                char a;                 cout << "Moving on to next scenario! Enter any key to continue or q to quit and r to retry the last scenario .";            cin >> a;               if(a == 'q'){                  return 0;              }else if (a == 'r'){                scenario_a();              }else{                scenario_b ();              }  }  //scenario 2  int scenario_b () {              cout <<"  2";               char a;                 cout << "Moving on to next scenario! Enter any key to continue or q to quit and r to retry the last scenario .";              cin >> a;           if(a == 'q'){              return 0;            }else if(a == 'r') {                scenario_b();          }else{                scenario_c ();          }    };  //scenario 3  int scenario_c () {          //print scenario out          cout << "  3";          char a;            cout << "Moving on to next scenario! Enter any key to continue or q to quit and r to retry the last scenario .";          cin >> a;           if(a == 'q'){              return 0;            }else if(a == 'r') {              scenario_c();            }else{          scenario_d ();          }    }  //scenario 4  int scenario_d () {          //print scenario out          cout << "  4";          char a;             cout << "Moving on to next scenario! Enter any key to continue or q to quit and r to retry the last scenario .";            cin >> a;            if(a == 'q'){              return 0;            }else if(a == 'r') {              scenario_d();          }else{          scenario_a ();          }                }        };            int main () {      scenario so;        cout << "Welcome to imagi-ventures! Please use 1, 2, 3, or 4 to select a choice   Enter q to quit.  " <<endl;        srand(time(NULL));      int randStr = rand() % 4;      char choice;       cout <<"Pick a scenario:   1. ?   2. ?   3. ?   4. ?  ";       cin >> choice;      if (choice == 'q'){        return 0;      }    //When the user enters something it will automatically pick random scenario          if (randStr == 0) {              so.scenario_a () ;          }else if (randStr == 1) {          so.scenario_b ();            }else if (randStr == 2) {          so.scenario_c ();            }else if (randStr == 3) {          so.scenario_d ();            }          }  
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote