public class Schedule implements Cloneable {
    private static final int NUM_DAYS = 7;
    private int[][] hours; // [7][2] -> start/end for each day
    public Schedule() {
        hours = new int[NUM_DAYS][2];
    }

    public void setHours( int day, int start, int end ) {
        hours[day][0] = start;
        hours[day][1] = end;
    }

    public int getStart( int day ) { return hours[day][0]; }
    public int getEnd( int day ) { return hours[day][1]; }
    
    public Object clone() throws CloneNotSupportedException {
        Schedule copy = ( Schedule )super.clone();
        // Deep copy of 2D array
        copy.hours = new int[hours.length][2];
        for (int i = 0; i < hours.length; i++) {
            copy.hours[i][0] = hours[i][0];
            copy.hours[i][1] = hours[i][1];
        }
        return copy;
    }
}
