Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming in C++ using xcode. You are doing statistics on salmon fish weights randomly sampled from Maine lakes. At each of several sites across the

Programming in C++ using xcode.

image text in transcribed

You are doing statistics on salmon fish weights randomly sampled from Maine lakes. At each of several sites across the state, data is collected weekly. The number of sites varies from week to week. Each line contains a lake identification number and a fish weight in pounds. Turn in source code and the output in a screenshot (same as previous assignments). Commenting as described in class is required and will no longer be listed in the problem description. Input: The following dataset provides the fish-weight information. An integer lake identification number is followed by a fish weight in pounds. Use this sample for your final run but note your code must work for any data set, including the empty one. First, save this data in a 2D array (select a suitable datatype for this array). 1000 4.0 1010 2.0 1050 1.5 1000 2.0 1000 2.2 1010 1.9 1050 2.8 Output: First, display a neat chart of the lake identification, lake name, and fish weight (use field widths and set precision to show one decimal place). Following the display of data, report the results of the following statistics. If the data set has no fish, after the count display "No statistics" as you are not able to generate average, maximum, or minimum. Programmer Name Overall number of fish collected Average fish weight over all sites Weight of heaviest fish over all sites (Hint: Assume the first fish is heaviest and see if any are larger.) Weight of lightest fish over all sites (Hint: Assume the first fish is lightest and see if any are smaller.) After the statistics display a histogram made of stars of the number of fish in each of the four lakes. For example, the following chart would display if there were 2 fish in Chemo, 3 in Greene, 5 in Hopkins, and 1 in Toddy. A sample histogram is shown below Lake Fish Count Chemo Greene Hopkins Toddy* The lake names are mapped to the lake IDs as follows. Lake ID Lake Name 1000 1010 1050 1100 Chemo Greene Hopkins Toddy

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions