Question
Using the java.util.Calendar class, write a program that converts the format of a timestamp, complete the below: 1. Create 3 dates and times. Write a
Using the java.util.Calendar class, write a program that converts the format of a timestamp, complete the below: 1. Create 3 dates and times. Write a method to identify and print out the oldest of the 3 timestamps. Likewise, create another method that prints out the most recent time. 2. Using the toString() method, converts this time format: 10/22/2014 12:00 AM to Wednesday, October 22, 2014 at 12:00 AM 3. Create calendar objects for "today" and "date of birth" and then identify the difference in years. Print out 2 examples: one of a birthday that has already occurred during the current year, and the other for a birthday that will occur in the future. For example: If today is 2/21/2019 and your birthday is 06/30/1991, then the method you write should output 27 years old. 4. Many businesses have logic to ensure valid data. For example, a hire date must occur today or in the future. Write a constructor for a calendar that will create new timestamps that meet this criteria. 5. Create a set of objects for the data set below and then output the total number of employees that are full-time AND were hired after the year 1990. Use a loop to speed up the evaluation process. Employee Name Hire Date Years Status Palmer, Terry 9-Jun-96 21 Full Time Nicholson, Lee 20-Jul-88 29 Half Time Jensen, Kristina 8-Apr-07 10 Hourly Randall, Yvonne 3-Jul-94 23 Full Time Cole, Elbert 1-Nov-01 15 Full Time Allen, Thomas 14-Sep-90 26 Contract
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started