Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a java program ( Homework5.java ) to prompt the user to enter a month as an integer between 1 and 12, a day of

Create a java program (Homework5.java) to prompt the user to enter a month as an integer between 1 and 12, a day of the month as integer between 1 and a maximum determined by the month, and year as a 4 digit integer.

Create separate input methods for each requested input - specifically inputMonth, inputDay, inputYear - and return the value entered. Include appropriate conditionals to validate user input before returning the value.

Create two methods, printAmerican and printEuropean, to generate formatted output based on the user input. Both methods should have three parameters for the date values.

Output for printAmerican(7,22,2019): July 22, 2019

Output for printEuropean(7,22,2019): 22 July 2019

Use some type of flag value to indicate to main when input is not valid, and check that flag value to prevent printAmerican and printEuropean from running if the user doesn't give valid input. Examples of flag values are contained in the conditionals decks and class assignments.

Include Javadoc comments for each of the methods created. You do not need to generate the Javadoc.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

Does your message present a conclusion?

Answered: 1 week ago

Question

=+What is the nature of the plant or site-level role of unions?

Answered: 1 week ago