CS 149 Fall 2018 - Instructor: Molloy Sections: 10 and 11

Home
Calendar
Syllabus
Resources
Linux Install

Lab11: Validation using do-while

If we want to write a program to output the text based day of the week given a numeric day of the week, we could solve this with nested If Then Else statements.

If Then solution to Weekday

IfWeekday.java

This is tedious and a lot of nesting. There's Got to be a better way... Introducing the Java Switch / Case

SwitchWeekday.java