Question: CSC-201 Programming Project-1 In this project you will write a program that will receive a date in the form of mm/dd/yyyy. The program will then


CSC-201 Programming Project-1 In this project you will write a program that will receive a date in the form of mm/dd/yyyy. The program will then determine the day of the week (Monday Sunday) that corresponds to the given date. Below is the formula for determining the day of the week. N = (d +2m + [3m +1)] + y + l-Lice] + 2) mod 7 d is the day number from the date. m is the month number from the date. y is the year number from the date. The symbol [n] means the floor of n, for example (3.5) = 3. The calculation of N will result in a number from 0 to 6 inclusive. The days of the week map to N as follows. 0 = Saturday 1 = Sunday 2 = Monday 3 = Tuesday 4 = Wednesday 5 = Thursday 6 = Friday A very important rule is the number to use for the months for January and February. The numbers of these months are 13 and 14 of the PREVIOUS YEAR. This means that to find the day of the week of New Year's Day 2021 , i.e. date 01/01/2021, you must use the date 13/01/2020 in the formula. To find the date of Februrary 2021 you must use 14/01/2020. You program should use the Scanner object to read in a date in the format of month/day/year into a string Variable. The year must be a a four digit year. For example 03/05/2021. Your program should use string methods to parse out the month number, day number, and year number, convert them to type integers and use them in the formula to figure out the day of the week. Your output should look similar to the following. CSC-201 Computer Science-1 Section:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
