/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.lab8_calebfontenot;

import java.util.Scanner;

/**
 *
 * @author caleb
 */
public class Switch3 {

    public static void main(String[] args) {
        // Define vars
        int dayOfWeekInt;
        String dayOfWeekString = "nullday",
                ordinal = "0th";

        // Create scanner
        Scanner input = new Scanner(System.in);

        // Prompt for input
        System.out.print("Enter a number that signifies a day of the week: ");
        dayOfWeekInt = input.nextInt();

        // Switch moment
        switch (dayOfWeekInt) {
            case 1:
                dayOfWeekString = "Sunday";
                ordinal = "1st";
                break;
            case 2:
                dayOfWeekString = "Monday";
                ordinal = "2nd";
                break;
            case 3:
                dayOfWeekString = "Tuesday";
                ordinal = "3rd";
                break;
            case 4:
                dayOfWeekString = "Wednesday";
                ordinal = "4th";
                break;
            case 5:
                dayOfWeekString = "Thursday";
                ordinal = "5th";
                break;
            case 6:
                dayOfWeekString = "Friday";
                ordinal = "6th";
                break;
            case 7:
                dayOfWeekString = "Saturday";
                ordinal = "7th";
                break;
        }
        // Print output
        if (dayOfWeekInt > 7)
            System.out.println("That number is too high.");
        else
            System.out.println(dayOfWeekString + " is the " + ordinal + " day of the week.");
    }
}
