Question: Please help me fix my code. JAVA program. /** * PoD 4.3 * CSCI 1105 * * @author Dr. Angela Siegel * @version 1.0 *

Please help me fix my code. JAVA program.
/** * PoD 4.3 * CSCI 1105 * * @author Dr. Angela Siegel * @version 1.0 * @since 2020-05-04 */
import java.util.Scanner;
public class PoD{ public static void main(String[] args){
//Create a Scanner object to read input from the keyboard Scanner in = new Scanner(System.in);
//Input int hour = in.nextInt(); String minutes = in.next();
System.out.println("24-hour time: "+ hour + ":" + minutes);
/*======================== || Start your work here || =========================*/ if(hour==0){ hour=12; }else if(hour>=13){ hour= hour-12; }else if(hour
/*======================== || End your work here || =========================*/
System.out.println("12-hour time: " + hour + ":" + minutes); } }
POD 4.3: Tick Tock (24hr to 12hr Clock Conversion] / 1. Tick Tock Saved 100 points possible Details Input The program takes in the following input: hour an integer value, from 0 to 23, representing the hour in the day in 24-hour time. minutes: an string value, from 00 to 59, representing the minutes after that hour. You might rightly be asking yourself why I'm giving you minutes as a string! Think about it... (play with it even!) What happens if I give you minutes between 00 and 09? Not convinced, try it! I'm just making life a bit easier. Processing This is your task! You will convert the hour, given by the variable hour to the appropriate 12-hour clock time as follows: if the value of hour is 0. you must change it to 12 (as 0:mm on the 24-hour clock represents 12mm AM on the 12-hour clock). If the value of hour is 13 or more, you will have to subtract 12 from that number so that the hour meets the criteria of a 12-hour clock. - Output Relax! The output is taken care of for you! Note that full output will be of the form: 24-hour time: HH:mm 12-hour time: hh:mm Based on your work, this will output the appropriate 12-hour clock time as defined above, where hh represents the hour (possibly one or two digits) and mm represents the minutes after that hour (always 2 digits). Sample Input/output: Input 0 00 Output 24-hour time: 12-hour time: 0:00 12:00 8 8 17 8:17 8:17 11:35 11:35 11 35 12 00 13 01 24-hour time: 12-hour time: 24-hour time: 12-hour time: 24-hour time 12-hour time: 24-hour time: 12-hour time: 24-hour time: 12-hour time: 12:00 12:00 13:01 1:01 17:29 5:29 17 29
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
