-
Notifications
You must be signed in to change notification settings - Fork 0
/
WifiDiagnosis.java
70 lines (46 loc) · 1.88 KB
/
WifiDiagnosis.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.util.Scanner;
public class WifiDiagnosis {
public static void main(String[] args) {
System.out.println("HELLO");
String answers ;
System.out.println( "If you have a problem with internet connectivity, this WiFi Diagnosis might work.");
System.out.println( "Reboot your computer");
System.out.println( "Are you able to connect with the internet? (yes or no)");
Scanner kbr= new Scanner(System.in);
answers = kbr.nextLine();
if (answers == "yes") {
System.out.println("Rebooting your computer seemed to work ");
}
if (answers == "no")
{
System.out.println( "Second step: reboot your router ");
}
// else
// {System.out.println("try again");}
System.out.println("Now are you able to connect with the internet? (yes or no)");
answers = kbr.nextLine();
if (answers == "yes")
{System.out.println("Rebooting the router seemed to work");}
if (answers == "no")
{System.out.println("Third step: make sure the cables to your router are plugged in firmly and your router is getting power");
}
//else {System.out.println ("try again");}
System.out.println(" Now are you able to connect with the internet? (yes or no) ");
answers = kbr.nextLine();
if (answers == "yes") {
System.out.println("Checking the router's cables seemed to work.");}
if (answers == "no")
{System.out.println( "Fourth step: move your computer closer to your router");}
//else {System.out.println ("try again");}
System.out.println("Now are you able to connect with the internet? (yes or no) ");
answers = kbr.nextLine();
if (answers == "yes") {
System.out.println("Moving your computer closer to your router seemed to work.");
}
if (answers == "no")
{System.out.println( "Fifth step: contact your ISP");
}
//else {System.out.println ("try again");}
System.out.println("Make sure your ISP is hooked up to your router.");
}
}