CSCI-1320 Homework 07: Schedule Printer

Instructor: Todd Dole

Purpose Statement

This assignment provides practice in using the switch and break statements.

Instructions

For this assignment, you will create a new program with a class called SchedulePrinter, saved as SchedulePrinter.java

Use Scanner and prompt the user to enter a number between 1 and 7, with 1 representing Sunday, 2 representing Monday, etc.

Then, use a switch statement to print out your class schedule for the day you selected. You can include extracurricular activities or other regular events.

If your schedule is identical on some days, you should use multiple case statements for the same code section to avoid repeating code.

Example Solution:

            Please enter a number between 1 and 7 representing a weekday (1 = Sunday, 2 = Monday, etc.):  3
            Your schedule for Tuesday:
               1:20-2:35 PM - Program Design and Development 1
               4:00-6:00 PM - Cross Country Practice
        

Example Solution:

            Please enter a number between 1 and 7 representing a weekday (1 = Sunday, 2 = Monday, etc.):  1
            Your schedule for Sunday:
               9:30- 10:30 AM - Sunday School
               10:45 AM - 12:15 PM - Church
               2:00 - 4:00 PM - Nap Time!!!
        

Upload your solution (your SchedulePrinter.java source code file) to the assignment in Canvas.