44 lines
1.5 KiB
Java
44 lines
1.5 KiB
Java
// 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");
|
|
}
|
|
} |