Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program in C# to perform a bird survey to count the number of birds of each species in an area. Create a class
Write a program in C# to perform a bird survey to count the number of birds of each species in an area. Create a class BirdSurvey that is a linked list. The linked list can be one way linked list, circular linked list or a doubly linked list; whichever you choose.
BirdSurvey should have the following operations in addition to those normally found in your linked list class:
1. add(bird) adds the bird species bird to the end of the list, if it is not already there. sets its count to 1; otherwise, adds 1 to the count for bird.
2. getCount(bird) returns the count associated with the species bird. If bird is not on the list, returns zero.
3. getReport() displays the name and count for each bird species on the list.
You will write a program that uses BirdSurvey to record the data from a recent bird survey. Use a loop to read bird names until done is entered. Illustrate the use of each of the methods mentioned above, with the last being a Report of all the species of birds entered and the count for each species.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started