Question: Hello, I could use help with finding and fixing the bugs in the Java code below. If you could please document what changes were made

Hello, I could use help with finding and fixing the bugs in the Java code below. If you could please document what changes were made and label what constructors are being used in this code, that would be great!! Thanks in advance.

Hello, I could use help with finding and fixing the bugs inpackage u3a1_debugfixifstmts;

import java.util.Scanner;

/** * * @author omora */ public class U3A1_DebugFixIFStmts {

/** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here System.out.println("Teacher's Copy"); Scanner input = new Scanner(System.in); // prompt the user to enter 3 ints // and read them into // firstChoice //secondChoice //thirdChoice System.out.print("Enter three integers: "); int firstChoice = input.nextInt(); int secondChoice = input.nextInt(); int thirdChoice = input.nextInt(); //Determine & print the state of choices made if (firstChoice == 0) System.out.println("State of choices: " + "no choices made yet"); if (secondChoice == 0) System.out.println("State of choices: " + "user made first choice (" + firstChoice + ") " + "number of choices = 1"); else if (thirdChoice = 0) System.out.println("State of choices: " + "user made first choice (" + firstChoice + ") " + "user made second choice (" + secondChoice + ") " + "number of choices = 2"); System.out.println("State of choices: " + "user made first choice (" + firstChoice + ") " + "user made second choice (" + secondChoice + ") " + "user made third choice (" + thirdChoice + ") " + "number of choices = 3") } }

In this assessment, you will debug and fix a given Java console application that uses if statements, but the application does not compile nor execute. You can use either the Toolwire environment or your local Java development environment to complete this assignment. The application has four bugs. Your assignment is to find these bugs and fix them so that the application meets its stated requirements The requirements of this application are as follows: The application is to prompt the user to enter 3 integers representing three choices of numbers between 1 and 7. An integer value of zero means a choice has not been made yet. The application then determines and prints out the state of the choices made. That is the application determines and prints out the number of choices made and their values The three choices have restrictions on them based on their order. The choices are made in order such that if the user did not make a first choice of a number between 1 and 7 (first integer is zero) the user cannot make a second or a third choice. An example of the three integers in this case would be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!