Write an application that reads values representing a time in seconds and then prints the equivalent time
Question:
Write an application that reads values representing a time in seconds and then prints the equivalent time in hours, minutes, and seconds. (For example, 5322 seconds is equivalent to 1 hour, 28 minutes, and 42 seconds.) //Write a header file comment here. It should look like: /** * Title: CMPT 166 Assignment #1 Problem #1 * File: Time_Conversion.java * Description: To convert seconds to hours, minutes, and seconds * * @author: (your name) * @version (optional) * Student ID: (your student ID number) * Date: January 15, 2022 */ import java.util.Scanner; public class Time_Conversion { // Write your comment for the main method. public static void main(String[] args) { Int inputSecond, hour, minute, second; Scanner scan = new Scanner(System.in); System.out.print("How many seconds? "); inputSecond = scan.next(); // Write your code here. System.out.println(inputSecond + " second(s) is equivalent to " + hour + " hour(s), " + minute + " minute(s), and " + second + " second(s) is "); } } Expected Output How many seconds? 5322 5322 second(s) is equivalent to 1 hour(s), 28 minute(s), and 42 second(s). Problem #2 (5 marks) Write a Java program that reads an input of an entire line that consists of a first name, last name, student ID, and three quiz marks (three integers). Then it prints the first name and last name together, student ID, total of the quiz marks, and the average of the quiz marks with proper labels as you see in the expected output. Include a main file header comment and a comment for the main method. Expected Output Enter your input: Andrew Park 622334 10 8 9 --------------------------------------------------- Name: Andrew Park Student ID: 622334 Total of Quiz Marks: 27 Average of Quiz Marks: 9.0 Note: Your program is supposed to get the entire line (Andrew Park 622334 10 8 9) at the same time (the user types the entire line and press the enter key).