Use Java Wrapper classes to fix a program designed to manage dogs in a shelter
Subsection8.3.1Overview
The following program represents a simple management system to track the number of dogs in a shelter. It includes functionalities such as adding, deleting and displaying the count for a breed of dogs. However, the program contains several syntax and logical errors that prevent it from functioning properly.
Subsection8.3.2Instructions
Initialize a staticArrayList of Integer called dogCounts that will store the number of dogs for each breed
Review the code and correct the errors to ensure the program operates as expected
The expected output is:
Initial Dog Counts:
Breed 1 has 15 dogs.
Breed 2 has 30 dogs.
Breed 3 has 20 dogs.
Updated Dog Counts:
Breed 1 has 15 dogs.
Breed 2 has 35 dogs.