/home/caleb/ASDV-Java/lab8_CalebFontenot/src/main/java/com/calebfontenot/lab8_calebfontenot/Switch3ConvertedToIfElse.java
/*
 * 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 Switch3ConvertedToIfElse {

    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();

        // No longer Switch moment
        if (dayOfWeekInt == 1) {
            dayOfWeekString = "Sunday";
            ordinal = "1st";
        } else if (dayOfWeekInt == 2) {
            dayOfWeekString = "Monday";
            ordinal = "2nd";
        } else if (dayOfWeekInt == 3) {
            dayOfWeekString = "Tuesday";
            ordinal = "3rd";
        } else if (dayOfWeekInt == 4) {
            dayOfWeekString = "Wednesday";
            ordinal = "4th";
        } else if (dayOfWeekInt == 5) {
            dayOfWeekString = "Thursday";
            ordinal = "5th";
        } else if (dayOfWeekInt == 6) {
            dayOfWeekString = "Friday";
            ordinal = "6th";
        } else if (dayOfWeekInt == 7) {
            dayOfWeekString = "Saturday";
                    ordinal = "7th";
        }

        // 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.");
        }
    }
}