- The admission button, method stubs, and properties provide the structure required for a booth visit.
MainWindow.xaml named admitGuestButton. Set the Content property of the button to "Admit Guest".

Booth constructor to use the WaterBottlePrice property instead of a hard-coded value.CreateComoZoo method in the MainWindow.xaml.cs by storing them in local variables.Add method calls and returns to methods as specified in the sequence diagram below.The sequence starts with the click event for the admitGuestButton.

SellTicket method, only find a ticket if the guest has provided sufficient funds.FindTicket method should first check to see if the number of items in the list is greater than zero.If so, store the first item in a variable, remove the item from the list, and then return the item.
4.1.9 How to Remove an Item from a ListRedeem method. Set the ticket's isRedeemed field to true.admitGuestButton.Step through the code to ensure each method is called correctly. Check for the following results:
FindTicket method all the way back to the MainWindow, and the guest should be admitted to the zoo.Ensure that a null reference occurs when trying to admit the sixth guest.
CreateComoZoo method, use the comoZoo's SellTicket method to pass in legitimate tickets to the zoo for Darla and Greg in the call to the comoZoo's AddGuest method.It will be necessary to delete the local variable tickets to use the ticket objects returned from the call to the SellTicket method.
CreateComoZoo method.AddGuest method.admitGuestButton.Ensure that a null reference exception is generated in the AddGuest method due to there being no tickets remaining.
SellTicket method should check to see if the given payment is enough to purchase a ticket.If so, find a ticket.
SellTicket method should also check to see if the found ticket exists.If it does, add the payment to the booth's money balance.
admitGuestButton.Step through the code to ensure each method is called correctly. Check for these results:
FindTicket method and back through to the MainWindow.ticketBooth gains $15 after the sale of a ticket.ticketBooth and the purchase of a ticket.MainWindow.xaml.cs, change the ticket price passed into the Zoo's constructor to 17m.Add method calls to the VisitTicketBooth method as specified in the sequence diagram below.
FindWaterBottle, FindMap, and FindCouponBook methods should be similar to the FindTicket method.SellWaterBottle method is similar to the SellTicket method, including the check to see if the payment is enough.The GiveFreeMap and GiveFreeCouponBook are also similar but do not check for payment because no payment is required.
VisitTicketBooth method.Step through the code to ensure each method is called correctly. Check for these results:
© 2026 Northcentral Technical College