Professional Documents
Culture Documents
Manager
MENU SYSTEM
1) Create a menu in a conditional loop that will repeatedly print out and allow the following options: 1 - Display All Animal Types 2 Find Largest Animal Population 3 Count All Animals in Zoo 4 Purchase New Animal
5 Sell Animal Enter nothing to End Turn. Show the amount of money the user has. The starting value is 100000. 10 - Log-off (this will close the program by exiting the loop. Do not use Application.Exit() or any other similar subprogram.) The user should only have to type in the number to select each of the above options.
SELL ANIMAL
Allow animals to be sold. The user inputs are the animal type and the quantity to be sold. If the user inputs an animal type that does not exist in your arrays, OR the quantity to be sold is more than the quantity they have, do not all them to sell. If the information is valid, reduce the quantity element for the animal type they sold. You do not need to remove the animal from the array if the quantity is 0.
END TURN
When the user does not enter anything, it ends the turn. At the end of the turn, the program will Calculate total upkeep cost of all animals. This is subtracted from the users money. Calculate the revenue for the zoo. This is a calculation as follows: 1) The revenue that the first animal of each type generates is worth its entertainment value * 10.
2) The revenue that the second animals of each type generates is worth its entertainment value * 5. 3) The revenue created by the 3 animal is its entertainment value. 4) The revenue created by the 4th and greater animals is 1. Add the revenue to the users money.
For your solution, you: MAY use either the Console Project OR a Windows Form Project. MUST use arrays, counting loops, and constants.
Marking Scheme
Application: Weight 8. This section is out of 50 marks. Creating and Using Arrays and Constants Used a constant for the default size Correct data types Display All Animal Types Can iterate (go through) arrays/parallel arrays Counting loop goes through all elements in the array Find Largest Animal Population Count All Animals in the Zoo Can create search algorithm to find parallel array items Can apply knowledge of parallel arrays to modify a secondary set of parallel arrays Purchase New Animals Can do array search Can do array resize Can modify existing array Sell Animal Can do array search Can modify array End of Turn Can do array search Can perform array calculations Communication: Weight 8. This section is marked by level. Mark Arrays correctly named Out of Arrays commented 100 Array comments are detailed Counting loops commented Counting loop comments are detailed Header appropriate Variables correctly named Program is correctly indented Conditional loops commented Selection statements commented Equations/calculations are commented Non-trivial code (anything complicated; not just an input or output) is commented Useful prompts for any inputs and outputs Thinking: Weight 3. This section is marked by level. Testing plan: Thoroughly tests a variety of cases in each part of the program o Menu White Box o Find Largest Animal Population - Black Box o Display All Animals Black Box o Purchase New Animals Black Box o Sell Animal Black Box o End of Turn White Box Tests boundary cases Tests regular cases Mark Out of 100 Comments Marks Out of 5 Comments
Out of 5
Out 10
of
Out 15
of
Out of 5
Out 10
of
Comments