This function should accept a two-dimensional

Assignment Help C/C++ Programming
Reference no: EM13165511

Write a program that creates a two-dimensional array initialized with test data. Use any data type you wish. The program should have the following functions:

getTotal. This function should accept a 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 all the values in the array.

- getRowTotal. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the total of the values in the specified row.

- getColumTotal. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a column in the array. The function should return the total of the values in the specified column.

- getHighestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the highest value in the specified row of array.

- getLowestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the lowest value in the specified row of array.

Reference no: EM13165511

Questions Cloud

Arrays & more loops practice : Write a program ArraysAndLoops and implement the following in the main method:
State what kind of compound is dihydroxypentane : What kind of compound is 2,3-dihydroxypentane? From what precursor do you synthesize the kind of compound that 2,3-dihydroxypentane is?
The main program should create an ifstream : For decryption, the main program should create an ifstream for the file to be decrypted. It should use the getline method of the ifstream to read lines from the file, call the encryption / decryption function with the line to be decrypted, and dis..
People must be in a group in order to guarantee : How many people must be in a group in order to guarantee that two people in the group have the same birthday (don't forget leap year)?
This function should accept a two-dimensional : getLowestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the lowest value in the specif..
Considered to be an improved version : Part (c) is considered to be an improved version of Part (b). You may use an array (2-dimessional) to store some values that has been computed during the run so that when making recursive calls the program does not compute certain values over and ..
What mass of this substance must evaporate : What mass of this substance must evaporate in order to freeze 112 of water initially at 18? (The heat of fusion of water is 334 the specific heat of water is 4.18 .
Flaw in your design and outline : After completing Part a, discuss the flaw in your design and outline some code that will cause it to break (your code should compile fine and will also execute without an error but will violate how a rectangle or square should behave).
Calculate the mole percent composition of the mixture : Calculate the weight percent composition of the mixture, using the same assumptions as in part A.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Class to act as a generic array

Create a class to act as a generic array (i.e. the user will be able to choose the data type to be stored by passing the appropriate template argument.

  To reverse the order of elements on a stack

Write a program in C++ to  reverse the order of elements on a stack S using two additional stacks using one additional stack

  Flipflaps - game based on pancake sorting

The project is to design and write a C++ 11/FLTK game program with a graphical user interface.The game is based on "pancake sorting,", which actually has some mathematical significance.

  Design class for textbook-data field for grade level of book

Design a class named TextBook that is child class of Book. Include new data field for grade level of book. Create a displayTextBookInfo () method so that you can accommodate new grade-level field.

  Create a c++ console application

Objective: Create a C++ console application that will model the characteristics of a resistor. Create a multifile project. Create and add to the project an h file containing the resistor-class definition. Create and add to the project a cpp file cont..

  Write a program code to compute and build a table of reynold

Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)

  Program that read in from the key board a string

Write a complete C++ program that read in from the key board a string and convert all letters in the string to upper cases. You are not allowed to use toupper function.

  Change this code to read in strings from a text file

code takes in a string from a user, checks if the paranthesis are ballanced (as defined by my class) and also returns the variable from my line (also from my class). All like to change this code to read in strings from a text file (each line is a str..

  Write function that randomly produces maze

Write a function mazeGenerator that randomly produces a maze (in C++). The Function should take as arguments a two-dimensional 12-by-12 character array.

  Develop a basic temperature class

You have to develop a basic temperature class

  Give a recursive definition of s.

Let S be the set of positive integers that can be written as a sum of one or more 4's and/or 7's. For example, 7 ? S and 18 ? S (because 18 = 4 + 7 + 7)

  Users to input two forces by their components

write a programm to ask users to input two forces by their components of (Fx1,Fy1) and (Fx2,Fy2) from the keyboard.call twice the function to display both magnitude and direction angle of two forces on the screen.add two forces and display both magni..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd