// Arup Guha
// 3/22/2026
// Example illustrating ArrayList and StringTokenizer
// Sorting People by Age - People class and main method.

import java.util.*;

public class Time implements Comparable<Time> {

	private int hour;
	private int minute;

	// Basic constructor.
	public Time(int hr, int min) {
		hour = hr;
		minute = min;
	}
	
	public int compareTo(Time other) {
	
		// Check hour.
		int tmp = this.hour - other.hour;
		if (tmp != 0) return tmp;
		
		// If we get here, this is the final answer!
		return this.minute - other.minute;
	}
}