// compareTo: compare two Account objects. // Precondition: parameter o is an Object (of type Account) // Postcondition: return 0 if this.id is the same as o.id, -1 if this.id < o.id, 1 if this.id > o.id. @Override public int compareTo(Object o) { if (o instanceof Account) { ... } // o is not an Account ... }
Ted Murphy,72354,10256 Jane Smith,69713,4000 Edward Demsey,93757,75932or something like this (format: name,id,dollars,cents):
Ted Murphy,72354,102,56 Jane Smith,69713,40,0 Edward Demsey,93757,759,32
// Sample driver code (alternatively, infixExp and postfixExp can be attributes of a Calculator class) String postfixExp = convertToPostfix(infixExp); int result = evaluatePostfix(postfixExp);
Submit final project via bitbucket and email (zip/jar) OR share via Google drive (drive.google.com).