Question: Need to create a program for showing the difference in seconds between two times of the day, using basic java, primative data, definite loops, parameters
Need to create a program for showing the difference in seconds between two times of the day, using basic java, primative data, definite loops, parameters and objects, conditional execution, and program logic and indefinite loops:
secondsDifference
Input: two time of day Strings
Returns: integer number of seconds difference between time of day inputs
(Returns -99999 if either time of day inputs invalid)
General time of day format HH:MM:SS
Examples:
// start end Return Value
// "12:34:09AM" "12:00:00PM" 41151
// "3:03:03PM" "12:00:02am" -54181
// "6:34:52PM" "6:34:52PM" 0
// "3:03:03PM" "7:91:73PM" -99999
//"Nice" "Day" -99999
public static int secondsDifference(String start, String end) {
}
// main
public static void main(String args[]) {
//Test Your Methods
} //End Main
} //End Class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
