Question: Problem 1): Write a program DateInfo.java that take as input following information from the user: Date of Birth Program of Study: Undergrad, Masters or PhD
Problem 1): Write a program DateInfo.java that take as input following information from the user:
Date of Birth
Program of Study: Undergrad, Masters or PhD
Program Start Date
Date format for output: MM/dd/yyyy or MM-dd-yyyy
Date of Birth: MM/dd/yyyy (depending upon the user given date format)
Start Date: MM/dd/yyyy (depending upon the user given date format)
End Date: MM/dd/yyyy (depending upon the user given date format)
Note:
Use output formatting for all the output statements
All the dates have to be displayed in the format chosen by user
Program should be able to check for valid date and print error if dates are not valid
End Date depends on Program of study. For example: Coder may choose to keep duration of undergrad to be 3 years. In that case end date will be 3 years later from the start date
Average Program Cost depends on Program of study. For example: Coder may choose to keep average cost as $12,000 for undergrad
Sample Input:
Enter DOB (MM/dd/yyyy): 10/28/1995
Program of Study (Enter 1 for Undergrad, 2 for Masters and 3 for PhD): 1
Program Start Date (MM/dd/yyyy): 08/16/2017
Date format for output (Enter 1 for MM/dd/yyyy and 2 for MM-dd-yyyy format): 2
-Use date formatting and parsing to convert whatever date format the USER uses to what the user decides the output format should be
Sample Output:
Date of Birth: 10-28-1995
Program: Undergrad
Start Date: 08-16-2017
End Date: 08-16-2020
Average Program Cost: $ 12,000.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
