Question: Given the following class definition, write the complete member function definition for the maxValue function which returns the maximum value form the array named values

Given the following class definition, write the complete member function definition for the maxValue function which returns the maximum value form the array named values which has size integer data values. if size is zero, then your function should return -1.

class FE{ public: FE(); void addValue(int); // value added to array if room, adds one to size int maxValue(); // return max value or -1

private: int size; // size always between 0 and 100 int values[100]; };

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!