{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

testTime - if(t1.compareTo(t3< 0...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class testTime { Time t1 = new Time(9, 57, 'a'); Time t2 = new Time("3:15pm"); Time t3 = new Time(1430); // military time t2.display(); System.out.println("t1 is: " + t1); mins = t2.elapsed(t3); // from t2 to t3 is this many minutes System.out.println("elapsed minutes from t2 to t3 is " + mins);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if (t1.compareTo(t3) < 0) System.out.println(t1 + "comes before t3 in a day"); if (t3.isAfterNoon()) System.out.println("t3 in afernoon"); if t = t2.military(); Time bad = new Time(50, 100, 'c'); System.out.println("bad is now " + bad);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online