Question
Assignment Description: Note 1: Read and understand all the given text of the assignment, then start writing the algorithm and test its correctness, and then,
Assignment Description:
Note 1: Read and understand all the given text of the assignment, then start writing the algorithm and test its correctness, and then, translate the algorithm to Java statements and type it into Java complier editor. Then, compile, run, and test its correctness, by using the given Sample Program Run.
Chapter 3:
Write a complete Java program that prompts and reads a string from the keyboard and then, tests whether it contains a valid date, using the format mm/dd/yyyy (mm for month, dd for day, yyyy for year). Then,
1. Displays the date in the format mm:dd:yyyy and then,
2.
A. Displays the date using a format mm/dd/yyyy and then,
B. Checks the date, if the data is valid or not valid (see below). If the date is valid, displays a message which indicates it is valid. If the date is not valid, displays a message it is not valid and explaining why it is not valid.
Notes on validation process of the input data:
The input date from the user will have the format mm/dd/yyyy.
1. A valid month value mm must be from 1 to 12 (January is 1).
2. The day value dd must be from 1 to a value that is appropriate for the given month.
A. April, June, September, and November each have 30 days.
B. February has 28 days except for leap years when it has 29.
C. The remaining months (January, March, May, July, August, October, and December) all have 31 days each.
3. A leap year is any year that is divisible by 4 but not divisible by 100 unless it is also divisible by 400.
NOTE PLEASE: please I need an explanation for every step I'm a beginner and I got this super hard assignment and don't understand anything!! please I need the answer to be less complex and easy to understand. thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started