Write a program that reads a string from the keyboard and testswhether it contains a valid date. Display the date and a messagethtat indicates whether it is valid. if its not valid, also displaya message explaining why it is not valid The input date will havethe format mm/dd/yyyy. a valid month value mm must be from 1 to 12(January is 1). The day value dd must be from 1 to a value that isappropriate for the given month. February has 28 days except forleap years when it has 29. a leap year is any year thtat isdivisible by 4 but not divisible by 100 unless it is also divisibleby 400 import java.util.Scanner; public class Ques1 { public staticvoid main(String[] args) { int month, day, year; boolean validDate;System.out.println(“Enter a date (mm/dd/yyyy)”); Scanner read = newScanner(System.in); month = read.nextInt(); day = read.nextInt();year = read.nextInt(); if((month >= 1 && month <= 12)&& (day >= 1 && day . . .

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!