Question: Write a program called TimeConvertor.java that converts times expressed in 24 hour clock to 12 hour clock and that converts times expressed in 12 hour

Write a program called TimeConvertor.java that converts times expressed in 24 hour clock to 12 hour clock and that converts times expressed in 12 hour clock to 24 hour clock. Here are five examples of what the program should look like when it runs:

i.

Enter a time ([h]h:mm [am|pm]):

00:00

12:00 am

ii.

Enter a time ([h]h:mm [am|pm]):

12:00 am

00:00

iii.

Enter a time ([h]h:mm [am|pm]):

4:00 pm

16:00

iv.

Enter a time ([h]h:mm [am|pm]):

17:01

5:01 pm

v.

Enter a time ([h]h:mm [am|pm]):

5:11 am

05:11

jgrasp is used. Thanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!