CSC1110 Homework - Week 2

Overview

This homework will give you practice getting input from the user and parsing it with String and Wrapper methods.

Instructions

Write a program called Homework2. java that does the following and replicates the output shown below.

  1. Asks the user for today’s date and the date they were born in the form mm/dd/yyyy. You must assume dates will be in this form.
  2. Print out the day, month, and year of today’s date. Also, print out how many months are left in the year.
  3. Print out the day, month, and year of the birthday. Also, print out approximately how many years it has been since their birthdate.
  4. Print out their approximate age by subtracting their birth year from the current year.

Sample Output

Enter today's date in the format mm/dd/yyyy
11/24/2025
Enter your birthdate in the format mm/dd/yyyy
03/04/1987
Today is day 24 of the 11 month in the year 2025.
There are/is 1 month(s) left in the year.
You were born on day 4 of the 3 month in the year 1987.
Your approximate age is 38.

Submission

See your professor's instructions for details on submission guidelines and due dates.