the project is to ask the user to enter three nonnegative intergers torepresent a time amount measured in hours, minutes, and seconds and then prints the equivalent time in seconds. Use three lines for input and one linf for output. The user's responsers should be on the same line as the prompts. One the output line use a complete and corret sentence that echoes the input and shows the equivalent total time in seconds.CODE]
[
Expand|Select|Wrap|Line Numbers
- B]the total time in seconds.[/Output should be exactly like this:
- The time interval 0 hours hours (s), 1 minute (s), and 0 seconds (s) is equivalent to 60 second (s).[/b]
Expand|Select|Wrap|Line Numbers
- Have input any special input situtations
Expand|Select|Wrap|Line Numbers
- Design the program with separate sections for input, annalysis, and output; use variables to hold the number of hours, minutes, and seconds.
Expand|Select|Wrap|Line Numbers
- Includeprint outs of at least 11 trial runs. Donot overlook extreme, marginal, and special cases of input. What happens if it crashes?
- My instructor sugged we write & run a preliminary on an easy topic, here is mine but I am having trouble revising iit.
- Please help!
Here is mine start:Please me get it into the type of program that is required. Thx!
//DivisionTester.java
//Purpose: This is an interactive program to test how interger division works.
import java.util.scanner;
public class DivisionTester
{
//
public static void main (String [] args)
{
//need a comment for main method
int numerator; // the user's numerator for the division
int denominator;// the user's denominator for the division
int quotient; // the calculated quotient of the two input values
scanner scan = newScanner(System.in);
//get the input values
system.out.print("Enter the numerator (as integer); ");
numerator = scan.nextInt();
system.out.print("Enter the denominator (as a nonzero number); ");
denominator = scan.nextInt();;
//calculate the quotient
quotient = r;
//report the quotient
system.out.println(numerator + "/" + denominator + " = ' + quotient);
} // end of main method
}// end of DivisionTester class