From cebbb584d3ec256dea468e73cec5d8a30d3151d9 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 11 Aug 2019 17:27:40 -0600 Subject: update program profile --- src/Q6/WeekDay.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Q6') diff --git a/src/Q6/WeekDay.java b/src/Q6/WeekDay.java index 7c79e8b..db77c17 100644 --- a/src/Q6/WeekDay.java +++ b/src/Q6/WeekDay.java @@ -15,6 +15,13 @@ public class WeekDay { new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; private static final int[] MONTHS = new int[] {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + /** + * Returns the day of the week that a certain date falls on. + * + * @param day the day of the month + * @param month the month of the year + * @param year the year + */ public String getWeekDay(int day, int month, int year) { this.ensureValidDate(year, month, day); return DAYS[daysSinceEpoch(day, month, year) % 7]; @@ -46,6 +53,7 @@ public class WeekDay { throw new IllegalArgumentException(); } + /** The entry point to the console application. */ public static void main(String[] args) { Scanner in = new Scanner(System.in); -- cgit v1.2.3