Currently the MainWindow is handling the instantiation of the employees, booth and guest AND assigning field values when it really should be the responsibility of the class to handle assigning those values.
This page is currently being built. Please check back soon.

Work through the user stories in order. Each story states the goal and acceptance criteria; its nested tasks retain the detailed implementation and verification steps.
Check the result against this instruction: Copy your 2.4 ending code, renaming both the folder and the Visual Studio solution file
Check the result against this instruction: Build your solution and ensure it compiles without warnings or errors.
Currently the MainWindow is handling the instantiation of the employees, booth and guest AND assigning field values when it really should be the responsibility of the class to handle assigning those values.
You will instantiate the employees, booth and guest in the MainWindow and pass values into a constructor that will then handle assigning values.
This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.
public Employee(string name, int number)
{
this.name = name;
this.number = number;
}Employee attendant = new Employee("Sam", 42);Booth booth = new Booth(attendant, 15.00m);Check the result against this instruction: Refactor the code in the MainWindow for the newSanDiegoZooButton_Click so that the Employees, Booth, and Guest are instantiated using constructors.



The MainWindow is handling the instantiation of the animal snack machine, birth area , restrooms and zoo AND assigning their values, when it should be the the responsibility of the class to handle that.
You will instantiate the animal snack machine, birth area, restrooms and zoo and pass values into a constructor that will then handle assigning values.
This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.
| Argument | Como | San Diego |
|---|---|---|
| name | Como Zoo | San Diego Zoo |
| capacity | 1000 | 3000 |
| restroomCapacity | 4 | 12 |
| animalFoodPrice | 0.75m | 1.20m |
this.comoZoo = new Zoo("Como Zoo", 1000, 4, 0.75m, booth, doctor, visitor);this.sanDiegoZoo = new Zoo("San Diego Zoo", 3000, 12, 1.20m, booth, doctor, visitor);

The MainWindow is handling the instantiation of the animals AND assigning their values, when it should be the the responsibility of the class to handle that.
You will instantiate the animals and pass values into a constructor that will then handle assigning values.
This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.
Check the result against this instruction: In the Animal class, change the visibility of the Age, Gender and HappinessLevel from public to private and rename the fields to age, gender and happinessLevel and change all references to lowercase.
Check the result against this instruction: Define a constructor that has the parameters type of type string, gender of type string, name of type string, age of type int, and weight of type double.
Check the result against this instruction: In the constructor, assign the age field to the age parameter, the gender field to the gender parameter, the Name field to the name parameter, the Type field to the type parameter, and the Weight field to the weight parameter.
Animal animal = new Animal("Dingo", "Female", "Dolly", 4, 35.3);Check the result against this instruction: In the MainWindow in the newComoZooButton_Click, instantiate Dolly the Dingo by passing in arguments.
Check the result against this instruction: Instantiate Dixie the Dingo using the constructor
Check the result against this instruction: Instantiate Pammy the Platypus using the constructor
Check the result against this instruction: In the MainWindow in the newSanDiegoZooButton_Click, instantiate Patti the Platypus by using the constructor.
Check the result against this instruction: Instantiate Harold the Hummingbird by using the constructor.
Check the result against this instruction: Delete the lines of code that assign the values of the animal object directly.
Check the result against this instruction: In the Animal class, instantiate the baby object using a constructor and delete the lines of code that assigned its values.



Food is instantiated in different places in the application for different reasons and the assigning of the fields is not taking place in the Food class when it should.
You will define a constructor in the Food class and use the constructor to instantiate food.
This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.
Check the result against this instruction: In the Food class, define a constructor with the parameter weight of type double.
Check the result against this instruction: In the constructor, assign the Weight field to the weight parameter.
Check the result against this instruction: In the Animal class in the Nurse method, pass in the milkWeight as an argument when instantiating the milk and delete the line of code that assigns the Weight field.
Check the result against this instruction: In the VendingMachine class in the SellFood method, pass in the foodWeight as an argument when instantiating the food and delete the line of code that assigns the Weight field.
This focused design shows the members or flow relevant to this feature. Keep unchanged members from your preceding checkpoint; follow the tasks below for the order of intermediate edits.
Check the result against this instruction: In the MainWindow class, change the visibility of the ZooAnimalCount and ZooAverageAnimalWeight from public to private and rename the fields to zooAnimalCount and zooAverageAnimalWeight.
Check the result against this instruction: Change all references to ZooAnimalCount and ZooAverageAnimalWeight to the proper camel casing.
Check the result against this instruction: Ensure that all code is StyleCop compliant.
Check the result against this instruction: Zip the solution and submit to the Feedback System.
Check the result against this instruction: Submit the Feedback System url to the correct assignment in Canvas.
Return to each user story and confirm that you can demonstrate its acceptance criteria. Use the task checkboxes to track completion; a checked box is not a substitute for testing or inspecting the required evidence.
Construct employees, booths, and guests with their values Construct a complete zoo and its facilities Construct animals with their initial state Construct food with a weight Keep window statistics privateRemove temporary lines used only to demonstrate compile-time errors. Build without errors or warnings, check StyleCop compliance, and rerun the required scenario paths.
Use the submission or attendance instructions in this page. For a Feedback System submission, upload the requested ZIP, review and resolve the feedback, and submit the resulting URL to the matching Canvas activity. For a Canvas quiz, enter only the requested answers; for an oral final, complete the scheduling and attendance steps.