Changes after the code (part) other unchanged
Public Static voidMain (String args[]) {Scanner in=NewScanner (system.in); intPrintnumber=0,boolchengchu=0,boolbrackets=0,mathnumber=0, MaxNumber=0,boolnegative=0,boolremainder=0; Try{System.out.print ("Print quantity is (positive integer)"); Printnumber=In.nextint (); if(printnumber<=0) {System.out.print ("Print quantity input does not conform to standard"); System.exit (0); } System.out.print ("Number of operands (positive integers)"); Mathnumber=In.nextint (); if(mathnumber<2) {System.out.print ("The number of operands entered does not conform to the standard"); System.exit (0); } System.out.print ("Is there a multiplication method (0 No 1 is)"); Boolchengchu=In.nextint (); if(boolchengchu>1| | Boolchengchu<0) {System.out.print ("Input non-conformance criteria"); System.exit (0); } System.out.print ("Is there a parenthesis (0 No 1 is)"); Boolbrackets=In.nextint (); if(boolbrackets>1| | Boolbrackets<0) {System.out.print ("Input non-conformance criteria"); System.exit (0); } System.out.print ("Maximum value is:"); MaxNumber=In.nextint (); if(maxnumber<=0) {System.out.print ("Input non-conformance criteria"); System.exit (0); } System.out.print ("Plus minus negative (0 No 1 is):"); Boolnegative=In.nextint (); if(boolnegative>1| | Boolnegative<0) {System.out.print ("Input non-conformance criteria"); System.exit (0); } System.out.print ("Division has no number (0 No 1 is)"); Boolremainder=In.nextint (); if(boolremainder>1| | Boolremainder<0) {System.out.print ("Input non-conformance criteria"); System.exit (0); } } Catch(inputmismatchexception e) {System.out.print ("Input non-conformance criteria"); System.exit (0); } for(inti=0;i<printnumber;i++) {Automatic automac; Automac=NewAutomatic (Mathnumber,boolchengchu,boolbrackets,maxnumber,boolnegative,boolremainder); System.out.println (""); } }
Correctly entered results
Enter Non-integer
Number of inputs out of bounds
The input is an integer but the greater the number of int bounds is written a large test program will not die, the result is not dead all is a number over the minimum lower bound int.
RIGHT-BICEP Requirements for designing unit test cases for arithmetic 2 programs