Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java programming language, write the following: Create enumerated data type for Day and Month in its own separate file. Then use it to hard

Using Java programming language, write the following:

Create enumerated data type for "Day" and "Month" in its own separate file. Then use it to hard code the birth dates (Day - enum, Month - enum, and Year - int) of your top 10 favorite US presidents as president objects stored in a sorted array. Then build a system in which the users enter their date of birth using the enumerated types and check to see if they have the same birth Month as a US president. If they do, also calculate the difference between the user and that president's birth years and report it on the screen as part of a congratulatory message. If they don't match any of them then print a message that they don't exactly match any president's birth date but tell them which president their birth date is closest to.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

lets start by creating the enumerated data types for Day and Month Well then define the President class create an array of President objects for our top 10 favorite US presidents and finally implement ... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions