A Problem Solved: Day of the Week
Explore how to write a Java program that computes the day of the week based on a given date using decision-making concepts like if statements and boolean expressions. This lesson helps you understand applying control flow to solve practical date-related problems.
We'll cover the following...
We'll cover the following...
Problem statement
On what day of the week does a given date fall? The date is given as three integers mm, dd, and yyyy, where
- mm is the number of the month and ranges from 1 to 12
- dd represents the day and ranges from 1