Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use jGRASP program to solve the following project. And Please Please Please use Ima Watcher, Ann Lookin, and Guy Oakley names for the output

Please use jGRASP program to solve the following project. And Please Please Please use Ima Watcher, Ann Lookin, and Guy Oakley names for the output of this project! Do not use any other names.

This program assesses your ability to use functions, arrays, for loops, and if statements where needed.

You are writing a program to track bird sightings in Prince William County for a weekend event where bird watchers watch birds and record each unique species that they see. Over a weekend, Saturday and Sunday, the bird watchers (aka birders) are going to record how many bird species they sight each day. You begin by asking the user how many bird watchers are participating in the event. Validate the response with a while loop to ensure that the value entered is between 0 and 100. Once you have a valid response, a for loop is entered for processing 4 parallel arrays. The size of each of the parallel arrays is equal to the number of bird watchers entered by the user.

The first array will store the name of the Bird Watcher.

The second array will store how many sightings (quantity) of different birds that the bird watcher reports for Saturday. Use a while loop to validate the quantity to make sure that it falls in the range of 0 to 250 inclusive. (Supposedly the world record for sighting different species of birds in one day by one person is 200; therefore, 250 should be reasonable for the maximum quantity of birds sighted by one person in a single day.)

The third array will store how many sightings (quantity) of different birds that the bird watcher reports for Sunday. Use a while loop to validate the quantity to make sure that it falls in the range of 0 to 250 inclusive.

The fourth array will store the total sightings for both days that adds the sightings for Saturday + the sightings for Sunday reported by the bird watcher.

If you have at least 1 bird watcher, print the contents of the parallel arrays meaning the bird watcher's name, Saturday sightings, and Sunday sightings, and Total Sightings for each bird watcher. You also need to calculate the average sightings from the Total Sightings array by using a calcAverage() function. You also need to search for the Bird Watcher with the most sightings and print their name out with the number of sightings for that person.

If you do not have any bird watchers (meaning if the user entered 0 bird watchers when prompted at the beginning of the program), end the program with a goodbye message.

The following functions are required although:

A function to calculate the average of the Total Sightings array.

The next page shows the output from the program running with some test data. Remember that your program must run for any number of bird watchers and not just these 3 bird watchers and data shown below.

Welcome to the Prince William County Bird Watching weekend tracking system.

___________________________________________________________

Please enter the number of bird watchers:

3

-------------------------Bird Watcher 1 -------------------------

Please enter the bird watcher's Name:

Ima Watcher

Please enter the birds sighted on Saturday:

25

Please enter the birds sighted on Sunday:

30

-------------------------Bird Watcher 2 -------------------------

Please enter the bird watcher's name:

Ann Lookin

Please enter the birds sighted on Saturday:

30

Please enter the birds sighted on Sunday:

35

-------------------------Bird Watcher 3 -------------------------

Please enter the bird watcher's name:

Guy Oakley

Please enter the birds sighted on Saturday:

35

Please enter the birds sighted on Sunday:

40

------------------------------------------------PWC Birdwatching Statistics-----------------------------------------

Bird WatcherSaturday SightingsSunday SightingsTotal Sightings

Ima Watcher253055

Ann Lookin303565

Guy Oakley354037.5

Average Sightings52.5

The Bird Watcher with the most sightings of 75 is Guy Oakley.

----------------------------------------------Thanks For Using Our Program---------------------------------

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions