I am trying to make a method that finds the max value of an integer in a vector. I want a method such as
/**
* The method returns an integer.
* The integer is the greatest value of all tagValues of the lab devices
*/
public int findMaximumValueTag()
The tag values will be the integer beside a device in a text file, on every line, such as
Android,53
Blackberry2,-95
iPhone,45
So, with the above, the method should return the 53.
The start of the class that contains the method is as follows:
public class Lab implements MaxTagValue {
String labName;
Vector<MobileDevice> devices;
Any help at all with pseudo code or anything would be greatly appreciated to get this started, thank you very much!
Also the beginning of the MobileDevice class is as follows:
public class MobileDevice {
String deviceName; // the device name
int valueTag; // an integer between -100 and 100
Lab lab; // the lab having this device it its inventory