And Just One More The group Citizens Against Noise have collected data for three car companies: Ford, Chrysler, and GM, representing the noise level (measured in decibels) produced at three different speeds by four different car models ( 2-door, 4-door, minivan, S.U.V.) for each company. An example of the data follows:
Ford
Car 40mph 50mph 60mph
0 ( 2-door)
1 ( 4-door)
2 (minivan)
3 (S.U.V.)
Use the information in the given class Table below to:
a. Write an instantiation for the three car manufactures of Table that would be used in main.
b. Write the source code to access for Ford, a minivan, at speed 50mph in main.
c. Write a class method float Table::Car_model_average (int) to compute the average noise level for a given car model.
d. Write the source code in main to access the method Car_model_average to compute the average noise level for a certain car manufacturer for a given car model.
class Table
{
public:
float Get_grid_element ( int, int);
private:
int Rows, Columns // number of rows & columns in use
float Grid [ 10] [ 10 ];
} |