Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 211, Assignment 8 Spring 2017 Page 1 of 2 CS 211: Introduction to Programming Spring 2017 Assignment 8, Due Thursday April 27th, 11:59 PM

CS 211, Assignment 8 Spring 2017 Page 1 of 2 CS 211: Introduction to Programming Spring 2017 Assignment 8, Due Thursday April 27th, 11:59 PM Working with two dimensional array. Write a C++ program which gets the temperatures for morning and afternoon for 7 days of a week. This means that you have to get 14 temperatures as input. Your program should have four different functions a required below. Requirements: Declare a two dimensional array called Temp with data type double. The two sizes you use for the two dimensions of array Temp should be declared as global Constants. Write a function called fillup_array which is responsible to get the input for array Temp. Write a function called find_average which is responsible to find the average temperature for the entire week. This function gets the array Temp as input. Use call by reference to access the average temperature inside the main function (Your function should not return back any value) Don't forget the two digits precision when you calculate the average. Use the cout statement inside the main function to print the average temperature for the entire week. Write a function called find_daily_mmm. This function is responsible to find the maximum, minimum, and mean temperature for each day in a week. This function has four arguments including: array Temp, max, min, and mean. This function does not return back any value. Use call by reference to save the values for max, mean, and min inside the related function arguments. You should call function find_daily_mmm inside the main function for each day of week. Don't forget the two digits precision when you calculate the mean. Write a function called show_warmer. This function takes the array Temp as one of its input parameters. It also gets another input called cutoff, which is a base temperature using for comparison. This function compares all the temperatures in a week with the cutoff and prints each day of a week which is warmer than cutoff. Your function then needs to print the day and temperature. Considering the cutoff 10, one example of the printed message by this function is : At day 6, morning, the temperature was 11 which is warmer than 10 When you check your array to find the temperatures that are warmer than the cutoff you need to figure out a way to know if the temperature is for morning or afternoon. (you need this information when you print the message)

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago