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++),
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; } }
Step by Step Solution
3.31 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
Heres the corrected and verified code with the included requirements package week8 import javautilSc...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started