Add Q3.java
This commit is contained in:
44
Q3.java
Normal file
44
Q3.java
Normal file
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user