TestFraction.java - package printTestFraction import java.util.Scanner import printFraction.Fraction public class TestFraction public static void

TestFraction.java - package printTestFraction import...

This preview shows page 1 out of 1 page.

package printTestFraction; import java.util.Scanner; import printFraction.Fraction; public class TestFraction { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { System.out.print("Enter a number to generate fraction, or -1 to exit : "); int choice = sc.nextInt(); if(choice<0) { break; } else { Fraction f = new Fraction(); f.input(); f.output(); } } System.out.println("Enter the fraction detail below to test isZero() method ");
Image of page 1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture