- The animal hierarchy supports the additional animal types specified in the assignment.

this.comoZoo.AddAnimal(new Chimpanzee("Bobo", 3, 50.0));try
{
// unsafe code goes here
}Inside the catch block, call MessageBox.Show. Pass in a message telling the user that they must have a ticket in order to enter the zoo.
4.2.6 How to Use Message Boxescatchcatch
{
// code here
}A message box with your user-friendly message about running out of tickets should pop up. Click OK.

A message shouldn't be shown. Instead, you should be able to keep clicking without an exception being thrown.



It might be necessary in the SellTicket and SellWaterBottle methods to change a reference to the moneyBalance field to a call to the AddMoney method.



Ensure that the breakpoint is hit and that the call came from the ticketBooth object calling AddMoney in the Zoo constructor by using the Call Stack.

The Call Stack will change. Check to ensure that the new call came from the AnimalSnackMachine calling AddMoney.
Check to ensure that the new call came from the wallet object in the VisitTicketBooth method in the Guest class.
Check to ensure that the new call came from the ticketBooth object in the SellTicket method in the Booth class.

© 2026 Northcentral Technical College