Question: Need Help On java H/W. T hanks Here is the assigment 6 task 3 below the one I have completed. And here is the code
Need Help On java H/W. Thanks

Here is the assigment 6 task 3 below the one I have completed.

And here is the code for it.

I will poste the code below to make it easier.
import java.util.Scanner; public class CountDayshoursseconds {
public static void main(String args[]){ System.out.println("Enter the Number of seconds:-"); Scanner sc = new Scanner(System.in); Integer seconds = sc.nextInt(); System.out.println("DaysHoursSeconds"); }
private static String convertToDaysHoursSeconds(Integer seconds) { String str = null; Integer Days = seconds/1440; Integer Hours = (seconds - 1440*(Days))/60; Integer sec = (seconds - 1440*(Days)) - 60*Hours ; str = "The Total time is "+Days+" Days " + Hours + " Hours and "+sec+" Seconds";
return str; }}
Programming Assignment: Update Assignment 6, Task 3 Create individual methods that will do the conversion Only output hours if there are enough seconds for 1 hour, Hours Minutes Seconds Only output minutes if there are enough seconds for 1 minute. Minutes Seconds We now want the program to calculate hours, minutes, seconds up to one day. You will (if) conditional statements and code blocks to create the program. (Utilize if/else or nested as necessary) Output Show number of seconds input and a conversion to Hours, minutes and remaining seconds. Have a print line for any input in seconds than 1 day. Have an additional output if the user enters seconds as or less than 0. Attach Snipping photo of Source Code and Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
