You have been approached by a local zoo to help develop a software application that can be used to train
You have been approached by a local zoo to help develop a software application that can be used to train their employees about the various needs and costs associated with different animal species. The application should be text-based, and operate according to the following procedure:
- Ask the user to specify how many animals are present in the zoo.
- Ask the user to specify a unique name for each animal, as well as its species (Tiger, Elephant, Rhino, Panda or Monkey).
- Simulate a virtual week (starting from Monday and ending on Sunday) where each day the following occurs:
- Print the current weekday, and the status of each animal. Each animal's status is represented by three properties (Hunger, Thirst and Boredom). Each of these properties has an initial value of 50.
- Ask the user to select one of three items (Food, Water or Toy) for each animal in the zoo. This choice will update each animal's properties, as well as the week's total cost, according to the chart below. The same item cannot be given to an animal two days in a row. The value for any status property cannot drop below 0.
- If an animal's hunger, thirst or boredom value is greater than 100, then the animal will die. If this happens, an additional $1000 will be added to the total zoo cost. The program should not ask the user to specify an item for dead animals on any future days.
- After a full week has passed, the total cost of looking after all animals' during the week will be printed.
your program should also be able to handle the following situations:
- The user enters an invalid number of animals (either a non-integer value or a negative integer). If this happens you should tell the user that their input is invalid and then ask them again.
- The user enters a name for an animal that has already been given to a previous animal (i.e., a non-unique name). If this happens you should tell the user that this name has already been taken and then ask them again. Please be aware that name uniqueness should be case-sensitive, so "ANDY" and "andy" are two different names.
- The user enters an invalid animal or item name. If this happens you should tell the user that their input is invalid and then ask them again.
- The user enters an animal or item name that contains upper and/or lower case letters. For example, "TIGER", "Tiger" and "tiger" are all valid animal names and should be accepted by your program.
- The user enters the same item for a given animal two days in a row. If this happens you should tell the user that they cannot give the same item as yesterday and then ask them again.