Question: How would you be able to program this in Java? This question is a good practice question for your final exam. Complete it successfully before
How would you be able to program this in Java?

This question is a good practice question for your final exam. Complete it successfully before the due date for + 1% to be added to your final mark. Clara has taken up a job as a time keeper. You need to write a program that takes as input an amount in seconds (a positive integer number), and then print to console the number of days, hours, minutes and seconds in that amount. Hint: There are 60 seconds in a minute, 60 minutes in an hour, and 24 hours in a day. Your solution should validate the user's input to ensure it is a positive integer value. Example 1. If the user enters 61 seconds, your program should output: Number of Days: 0 Number of Hours: 0 Number of Minutes: 1 Number of Seconds: 1 Example 2. If the user enters 86401 seconds, your program should output: Number of Days: 1 Number of Hours: 0 Number of Minutes: 0 Number of Seconds: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
