Assignment One using getMax() method