Display the date and a message

Assignment Help Computer Engineering
Reference no: EM132200768

Write a Java console application that reads a string from the keyboard and tests whether it contains a valid date. Display the date and a message that indicates whether it is valid. If it is not valid, also display a message explaining why it is NOT valid.

The input date will have the format mm/dd/yyyy.

A valid month value mm must be from 1 to 12 (January is 1). You can use:

String monthPart = inputDate.substring(0, 2);
int month = Integer.parseInt(monthPart);
to get the month value.

A valid day value dd must be from 1 to a value that is appropriate for the given month. September, April, June, and November each have 30 days.

Assume February has 28 days. All other months have 31 days.

The year can be any 4 digit year.

Be sure to use a switch statement at least once (perhaps for checking the valid months)

Reference no: EM132200768

What are the most common numbers for ip acls

What is an access control list? What's the most common type of ACL? What are the most common numbers for IP ACLs? How can you filter traffic using ACLs? What's the order of op

Values of the cf and of

assume that EAX contains a given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the in

Retailing and software

Discuss how retailing is improving the efforts along with their supply chain through the evolution of software, involving the software integration that supports these supply

Why one should choose to use a database

assume you wanted to keep a record of everything you own in your house. You could use a sequential data file to keep track of common items such as 'cloths'. The sequential f

Provide examples where cannot use logical operators

Search for arithmetic operators used in programming, and give two examples where you cannot use logical operators but you can use arithmetic operators. Also, think of two ex

Design a digital logic system that lights a lamp

button is presses if the a disk played is a hit and is not pressed if the disk played is a miss. plan a digital logic system that lights a lamp when a majority of the member

Verilog system

Develop a verilog system which utilizes a block code for the error management. The system must accept a 15-word block of 8-bit data words one word at a time.

Calculates and displays the mortgage payment amount

make Use of an array for the mortgage data for the different loans. show the mortgage payment amount followed by the loan balance and interest paid for each payment over the

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd