Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Minimum Requirements:

Create a class called gork. (4 points): Your class must have private variables. You decide which variables to store in the private section and how many. 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

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: a. Ask the user for the number of team members to be evacuated b. Based on the number of team members remaining, calculate the total number of tanks required for the remaining team members and display that result. Option 3. Request emergency resupply of non-corrosive oxygen tanks from base. If this option is selected: a. One quarter of the total team members are lost because of delays in the resupply mission. Calculate the total number of non-corrosive tanks required for the remaining team members and display the result.

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions