class ClassRoom { String name; int capacity; String[] timeSeg; ClassRoom (String name, int capacity) { this.name = name; this.capacity = capacity; timeSeg = new String[7]; for (int i=0; i<7; i++) timeSeg[i] = null; } void schedule (Course c, int ts) { if (c.num > capacity) System.out.println ("No hay espacio suficiente para " + c.name); else if (timeSeg[ts] != null) System.out.println ("Espacio de tiempo ya programado."); else timeSeg[ts] = c.name; } void printSchedule () { System.out.println ("Número de clase " + name + ": "); for (int i=0; i<7; i++) System.out.println (" " + (9+i) + ":00 - " + timeSeg[i]); } }