debug and verify if i included the following requirement compound condition, An Error-Validation loop, at least one
Question:
debug and verify if i included the following requirement compound condition, An Error-Validation loop, at least one other loop, at least one abbreviated incrementor (count++), also it must include a value-returning method located in the SAME class file as your project program and Display at least 1 image
package week8;
import java.util.Scanner; import java.util.Random;
public class Project2 {
public static void main(String[] args) { // TODO Auto-generated method stub int count = 0; String NOVA; String GMU; String JMU; String school;
boolean ask = true;
Scanner Sc = new Scanner(System.in); while(ask==true) {
System.out.print(" Enter Your Choice 1-3: "); System.out.println("do you choose NOVA? Yes - no");
System.out.println("do you choose GMU? Yes - no");
System.out.println("do you choose JMU? Yes - no"); while(count<1||count>3) { System.out.print(" Invalid Input. Enter Your Choice between 1-3: "); int count = SC.nextInt(); } if (count==3); } break; } else count++; if(NOVA.equals("yes") && GMU.equals("no") && JMU.equals("yes")) { System.out.println("YOU CHOSE NOVA"); } else if(dc.equals("yes") && college.equals("no") && house.equals("no")) { System.out.println("YOU CHOSE GMU"); } else { System.out.println("YOU CHOSE JMU"); } System.out.println("Do you want to try again? Yes - no"); String count = Sc.nextLine(); if(choice.equals("no")) { System.out.println("You have chosen "+count+" time "+"Thanks"); ask = false; } { public static int count(); Random rand = new Random(); int count = rand.nextInt(10); return count; } }
Statistics The Art And Science Of Learning From Data
ISBN: 9780321755940
3rd Edition
Authors: Alan Agresti, Christine A. Franklin