Write a program that allows students to schedule appointments at either 1, 2, 3, 4, 5, or 6 o’clock p. m. Use an array of six strings to store the names for the time slots. Write a loop that iterates as long as the array has a free space. Within a try block, allow the user to enter a time and a name. If the time is free, put the name in the array. If the time is not free, throw a TimeInUseException. If the time is not valid, throw an InvalidTimeException. Use a catch block for each different kind of exception.

What will be an ideal response?

See the code in TimeInUseException.java, InvalidTimeException.java, and Scheduler.java.

Computer Science & Information Technology

You might also like to view...

Match the following operating system to the software it runs

I. Macintosh II. Windows 8 III. Windows 8 RT IV. Windows Phone V. iOS A. Runs apps from the Windows store only B. Runs apps from the Apple store only C. Runs software written for the Macintosh operating system D. Runs software written for Windows 7 and above as well as apps from the Windows store E. Runs apps from the Windows store only, including Office 2013 for Windows Phone

Computer Science & Information Technology

What is the range of numbers used to identify IP standard access lists?

a. 0 to 99 b. 1 to 99 c. 100 to 199 d. 100 to 200

Computer Science & Information Technology