package homework;public class TimeInterval { private int firsttime; private int secondtime; public TimeInterval(int a, int b) { a = firsttime; b = secondtime; } public int getHours(int a) { String d = Integer.toString(a); int b = Integer.parseInt(d.substring(0,2)); return b; } public int getMinutes(int a) { String d = Integer.toString(a); int b = Integer.parseInt(d.substring(2,3)); return b; } public String TimeDiff(int a, int b) { int c = b - a; return getHours(c) + " hours " + getMinutes(c) + " minutes."; } public String Output() { return TimeDiff(firsttime, secondtime); }}