Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are working in a biology lab as a data scientist. Your job is to collect and analyze all data of a special type of
You are working in a biology lab as a data scientist. Your job is to collect and analyze all data of a special type of bacteria. After a few days of tracking the number of bacteria growth for each day at the specified temperatures, here are the data generated:
tabletableDaytemperatureDay Day Day Day Day
The data you need is presented in a D array format. Therefore, your program should create a two dimensional array of rows and columns, total of integers.
The array will be filled by the input file bacteria.txt
Next display all of the values in a D table format, with rows and columns, format the display use setw function. Your output format should match my sample output listed below
The program should also display the average value of all data the average should have two decimals
The program should display the highest value for all data.
The program should also display the sum for a certain temperature requested row sum You must validate that the row requested is a valid value.
The program should display the lowest value for a certain day column lowest You must validate that the column requested is a valid value.
Program Structure:
Declare two constant variables.
const int ROW SIZE ;
const int COLSIZE ; only the column size should be declared as global constant
The following functions must be included, but you may add additional functions if you wish.
with bacteria.txt file input
getData This function should pass a two dimensional array, and its row size. The function fills with the array with the data in the bacteria.txt file.
void getDataint dataCOLSIZE const int ROW;
displayData This function should be passed by array. The function will display all grades in the format shown on the back of this page.
void displayDataconst int dataCOLSIZE const int ROW;
You have to use left
Sample Display:
Program TwoDArray.cpp Results
The bacteria data is:
table
The total for all readings was
The average of all data is:
The highest value of all data is:
Please enter a row number so I can show you the sum of that row:
Invalid row number entered; please reenter:
Invalid row number entered; please reenter:
The sum of row is
Please enter a column number so I can show you the lowest value in that column:
Invalid column number entered; please reenter:
The lowest of col is
Bacteria.txt
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