toString() { return String.format("%-18s", time) + "\t" + String.format("%-10s", location) + "\t" + String.format("%-15s", person); } } Notice that we assume that a particular security Assignment only involves a time, location, and person. Also, note that to make the formatting in our toString() method easier, we use String.format() method. The first argument is a format string that specifies how many characters will be used to format the second argument. For example, looking at time, the format…
Words 930 - Pages 4