Question: Write a program that allows students to schedule appointment at either 1 , 2, 3, 4, 5, or 6 oclock pm. Use an array of
Write a program that allows students to schedule appointment at either 1 , 2, 3, 4, 5, or 6 oclock pm. 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.
plz write java program and send me screenshot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
