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
Get step-by-step solutions from verified subject matter experts
