Question 1
1.1 In your own words discuss similarities and differences between a function
and a small program.
1.2Define a function named average grade. This function returns a
double and has four double arguments testi test2 test3 test4. The return value should be the average or arithmetic mean of the four arguments. Be sure to include a comment that tells briefly what the function does
1.
Question 1
1.1 In your own words discuss similarities and differences between a function
and a small program.
1.2Define a function named average grade. This function returns a
double and has four double arguments testi test2 test3 test4. The return value should be the average or arithmetic mean of the four arguments. Be sure to include a comment that tells briefly what the function does
1.3 Find the errors in the following class and explain how to correct them:
class Example
public:
Example( int y = 10 ) : data( y
// empty body
1 // end Example constructor
int getIncrementedData ( ) const
return data++;
1 // end function getIncrementedData
static int getCount()
{
cout
Attachments: