Question: I need help. Can I have this in Dr Java please. Lab 04 Valid Date Objective: Write a program that checks whether or not a
Lab 04 Valid Date Objective: Write a program that checks whether or not a date entered in by the user is valid. Display the date and tell whether or not it is valid. .The input has to be in the format month followed by the day. This could either be via next item or next line . A valid month (mm) must be from 1 to 12 . A valid day (dd) must be from 1 to the appropriate number of days in the month o A June, September, and November have 30 days o February has at most 29 days o The rest have 31 Example Dialog Enter a date in the format month followed by the day 6 22 6 22 is a valid date! Another Example Dialog: Enter a date in the format month followed by the day 9 31 9 31 is NOT a valid date! Big Hints: This can be done without the usage of an "else-if" statement. Think how this would work as a compound Boolean expression If this is written as one "if-else" statement then the compound Boolean expression may seem lengthy . It may be a good idea put the expressions in a series of parenthesis. . Make sure to check for matching parenthesis and curly braces. Lab Report Questions: 1. Include a flow chart in your proposed solution section 2. Write the equivalent Boolean expression (a>b)&&!(bc) which doesn't use the NOT operator(). Assume that a, b, and c are integers. 3. Describe a way to also check for leap years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
