|
home—info—lects—labs—exams—hws
textbook—tutor/PIs—java.lang docs—java.util docs
Consider calling some helper methods — max and min. See the comment in Employee.java.
If you are more comfortable using if-else instead of calling max and min, then certainly do so.
However, suppose that max and min worked on Strings. (They don't, but we'll come back to that.) How much easier would getFirst or getThird be, for our TresAmigos exercise?
Compare to TresAmigos_v2.java
home—info—lects—labs—exams—hws
textbook—tutor/PIs—java.lang docs—java.util docs
©2009, Ian Barland, Radford University Last modified 2009.Mar.23 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |