CODE]
represent 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]
[
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.scann er;
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(Syst em.in);
//get the input values
system.out.prin t("Enter the numerator (as integer); ");
numerator = scan.nextInt();
system.out.prin t("Enter the denominator (as a nonzero number); ");
denominator = scan.nextInt(); ;
//calculate the quotient
quotient = r;
//report the quotient
system.out.prin tln(numerator + "/" + denominator + " = ' + quotient);
} // end of main method
}// end of DivisionTester class
the project is to ask the user to enter three nonnegative intergers to
[
Code:
B]the total time in seconds.[/[B]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][/B]
Code:
Have input any special input situtations
Code:
Design the program with separate sections for input, annalysis, and output; use variables to hold the number of hours, minutes, and seconds.
Code:
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. [B]Please help![/B]
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.scann er;
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(Syst em.in);
//get the input values
system.out.prin t("Enter the numerator (as integer); ");
numerator = scan.nextInt();
system.out.prin t("Enter the denominator (as a nonzero number); ");
denominator = scan.nextInt(); ;
//calculate the quotient
quotient = r;
//report the quotient
system.out.prin tln(numerator + "/" + denominator + " = ' + quotient);
} // end of main method
}// end of DivisionTester class
Comment