diff --git a/Q3.java b/Q3.java new file mode 100644 index 0000000..8934728 --- /dev/null +++ b/Q3.java @@ -0,0 +1,44 @@ +// Question 1 +// Import Scanner for user input +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + // Scanner for user input + Scanner scanner = new Scanner(System.in); + // Store the yes/no's + String response; + + // First step + System.out.println("Reboot the computer and try to connect."); + System.out.println("Did that fix the problem?"); + response = scanner.nextLine().toLowerCase(); + // If yes then exit the program + if(response.equals("yes")) + return; + + System.out.println("Reboot the router and try to connect."); + System.out.println("Did that fix the problem?"); + response = scanner.nextLine().toLowerCase(); + // If yes then exit the program + if(response.equals("yes")) + return; + + System.out.println("Make sure the cables between the router & modem are plugged in firmly"); + System.out.println("Did that fix the problem?"); + response = scanner.nextLine().toLowerCase(); + // If yes then exit the program + if(response.equals("yes")) + return; + + System.out.println("Move the router to a new location"); + System.out.println("Did that fix the problem?"); + response = scanner.nextLine().toLowerCase(); + // If yes then exit the program + if(response.equals("yes")) + return; + + // Done + System.out.println("Get a new router"); + } +} \ No newline at end of file