I need to write a code which I have a large quantity of values, and from these sample, get the maximum and minimum values. I was thinking of using vectors or arrays but there are too large a quantity...
> .. I have a large quantity of values...
if the values are in a file, pass the file (istream) to the minmax function. in the function, read the values one by one and check for min/max.
if the values are programmatically generated, pass the generator function (or function object) to the minmax function.
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);