Question

In: Mechanical Engineering

Write a program that uses a DYNAMIC two-dimensional array to store the highest and lowest temperatures for each month of the year (temperature is a decimal value)

In c++

Write a program that uses a DYNAMIC two-dimensional array to store the highest and lowest temperatures for each month of the year (temperature is a decimal value). The program should output the highest and lowest temperatures for the year. Your program must consist of the following functions:

a. Function getData: This function reads and stores data in the two-dimensional array.

b. Function indexHighTemp: This function returns the index of the highest high temperature in the array.

c. Function indexLowTemp: This function returns the index of the lowest low temperature in the array.

These functions must all have the appropriate parameters.

Solutions

Expert Solution


Related Solutions

Write a program that uses a DYNAMIC two-dimensional array to store the highest and lowest temperatures for each month of the year (temperature is a decimal value)
In c++ Write a program that uses a DYNAMIC two-dimensional array to store the highest and lowest temperatures for each month of the year (temperature is a decimal value). The program should output the highest and lowest temperatures for the year. Your program must consist of the following functions: a. Function getData: This function reads and stores data in the two-dimensional array. b. Function indexHighTemp: This function returns the index of the highest high temperature in the array. c. Function...
Write a program that uses a DYNAMIC two-dimensional array to store the highest and lowest temperatures for each month of the year (temperature is a decimal value)
In C++ c. The program should output the highest and lowest temperatures for the year. Your program must consist of the following functions: a. Function getData: This function reads and stores data in the two-dimensional array. b. Function indexHighTemp: This function returns the index of the highest high temperature in the array. c. Function indexLowTemp: This function returns the index of the lowest low temperature in the array. These functions must all have the appropriate parameters.
Using JAVA Write a program that uses a 2-D array to store the highest and lowest...
Using JAVA Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and highest and lowest temperatures of the year. Your program must consist of the following methods with their appropriate parameters: a.) getData: This method reads and stores the data in the 2-D array. b.) averageHigh: This method calculates and returns the average high temperature of the year. c.)...
C++ ASSIGNMENT: Two-dimensional array Problem Write a program that create a two-dimensional array initialized with test...
C++ ASSIGNMENT: Two-dimensional array Problem Write a program that create a two-dimensional array initialized with test data. The program should have the following functions: getTotal - This function should accept two-dimensional array as its argument and return the total of all the values in the array. getAverage - This function should accept a two-dimensional array as its argument and return the average of values in the array. getRowTotal - This function should accept a two-dimensional array as its first argument...
Write a program that uses an array for time and temperature. The program should contain an...
Write a program that uses an array for time and temperature. The program should contain an array with 24 elements, each of which is holding a temperature for a single hour. Your program should have a function that lists all of the temperatures that are held in the array. Temperatures should be listed to console with one entry per line. Your program should have a function that lists a single temperature entry. You should ask the user for a number...
Write a C++ function that takes a two dimensional dynamic array (matrix) and its sizes and...
Write a C++ function that takes a two dimensional dynamic array (matrix) and its sizes and returns true if the matrix is an upper matrix and returns false otherwise. Remark: A matrix M is an upper matrix if it is a square matrix (row size = column size) and every element M[i][j] = 0 for all i > j. That is all the elements of the matrix below the main diagonal are zero.
Write a program that uses an array of high temperatures for your hometown from last week...
Write a program that uses an array of high temperatures for your hometown from last week (Sunday – Saturday). Write methods to calculate and return the lowest high temperature (minimum) and a method to calculate and return the highest high temperature (maximum) in the array. You must write YOUR ORIGINAL methods for minimum and maximum. You MAY NOT use Math class methods or other library methods. Write an additional method that accepts the array as a parameter and then creates...
Write a program that uses an array of high temperatures for your hometown from last week...
Write a program that uses an array of high temperatures for your hometown from last week (Sunday – Saturday). Write methods to calculate and return the lowest high temperature (minimum) and a method to calculate and return the highest high temperature (maximum) in the array. You must write YOUR ORIGINAL methods for minimum and maximum. You MAY NOT use Math class methods or other library methods. Write an additional method that accepts the array as a parameter and then creates...
Write a Java program that will use a two-dimensional array and modularity to solve the following...
Write a Java program that will use a two-dimensional array and modularity to solve the following tasks: Create a method to fill the 2-dimensional array with (random numbers, range 0 - 30). The array has rows (ROW) and columns (COL), where ROW and COL are class constants. Create a method to print the array. Create a method to find the largest element in the array Create a method to find the smallest element in the array Create a method to...
Write a Java program that will use a two-dimensional array and modularity to solve the following...
Write a Java program that will use a two-dimensional array and modularity to solve the following tasks: 1. Create a method to generate a 2-dimensional array (random numbers, range 0 - 500). The array has ROW rows and COL columns, where ROW and COL are class constants. 2. Create a method to print the array. 3. Create a method to find the largest element in the array 4. Create a method to find the smallest element in the array 5....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT