Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this in java and compare users' birthdays please and ask if they want to continue the program and find how many days away

I need this in java and compare users' birthdays please and ask if they want to continue the program and find how many days away for birthdays and the percent away. Not using import java.text.SimpleDateFormat; import java.util.Calendar; . thank you!!! Also The assignment specified that you should use methods to finish this assignment. Some things the assignment mentioned were: "To receive full credit on this assignment, you are required to have at least 4 non-trivial static methods in your program besides main" You should "use static methods for structure and to reduce redundancy" You should "utiliz[e] parameters and return values appropriately" "Each method should perform a coherent task and should not do too large a share of the overall work by itself" "The main method should be a concise summary of the overall program execution." "The main method should not contain println statements"image text in transcribedimage text in transcribedimage text in transcribed

Task: This assignment will give you practice with if/else statements, loops, interactive programs with Scanner, cumulative sum algorithms, parameters, and return statements. Turn in a Java file named Birthdays.java. This program involves date comparisons in 2020, which is a "leap year." Leap years have an extra 366th day, which occurs as February 29th. The 366 days are divided among the 12 months as follows: Examples: The following is a single run of your program and their expected output (user input is bold and underlined): This program compares two birthdays and displays which one is sooner. What is today's month and day? 129 Today is 1/29/2020, day #29 of the year. Person 1: What month and day were you born? 1017 10/17/2020 falls on day \#291 of 366 . Your next birthday is in 262 day(s). That is 71.6 percent of a year away. Person 2: What month and day were you born? 1123 11/23/2020 falls on day \#328 of 366 . Your next birthday is in 299 day(s). That is 81.7 percent of a year away. Person 1 's birthday is sooner. your birthday fact here > Would you like to compare two more birthdays? Type 1 and then to compare two more birthdays Type 2 to end the program 1 This program compares two birthdays and displays which one is sooner. What is today's month and day? 214 Today is 2/14/2020, day \#45 of the year. Person 1: What month and day were you born? 110 1/10/2020 falls on day #10 of 366 . Your next birthday is in 331 day(s). That is 90.4 percent of a year away. Person 2: What month and day were you born? 228 2/28/2020 falls on day \#59 of 366. Your next birthday is in 14 day(s). That is 3.8 percent of a year away. Person 2 's birthday is sooner. your birthday fact here Would you like to compare two more birthdays? Type 1 and then to compare two more birthdays Type 2 to end the program 1 This program compares two birthdays and displays which one is sooner. What is today's month and day? 11 Today is 1/1/2020, day \#1 of the year. Person 1: What month and day were you born? 11 1/1/2020 falls on day \#1 of 366 . Happy birthday! Person 2: What month and day were you born? 1231 12/31/2020 falls on day \#366 of 366 . Your next birthday is in 365 day(s). That is 99.7 percent of a year away. Person 1's birthday is sooner. your birthday fact here Would you like to compare two more birthdays? Type 1 and then to compare two more birthdays Type 2 to end the program 1 This program compares two birthdays and displays which one is sooner. What is today's month and day? 228 Today is 2/28/2020, day \#59 of the year. Person 1: What month and day were you born? 229 2/29/2020 falls on day \#60 of 366 . Your next birthday is in 1 day(s). That is 0.3 percent of a year away. Person 2: What month and day were you born? 229 2/29/2020 falls on day \#60 of 366 . Your next birthday is in 1 day(s). That is 0.3 percent of a year away. Wow, you share the same birthday! your birthday fact here Would you like to compare two more birthdays? Type 1 and then to compare two more birthdays Type 2 to end the program 2 Thank you for using the program. Have a good day! Program Details: Your program asks for two users' birthdays and prints information about them. The program prompts for the birthday month and day of the two users. For both birthdays, the program prints the absolute day of the year on which that birthday falls, the number of days until the user's next birthday, and the percentage of a year (percentage of 366 days) away. Next the program shows which user's birthday comes sooner in the future. If it is a user's birthday today, or if the two birthdays are the same, different messages are printed. Lastly, the program prints a fun fact about your own birthday. Try searching Wikipedia and Google for interesting facts about your date of birth. For example, if yours is Sep. 19, you could print the following fact: Did ye know? 9/19 be International Talk like a Pirate Day. Arr, me mateys, arr

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

2. Give ungraded assignments to encourage exploration.

Answered: 1 week ago

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago