-
Notifications
You must be signed in to change notification settings - Fork 0
/
WifiDiagno.java
73 lines (45 loc) · 1.92 KB
/
WifiDiagno.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
71
72
73
import java.util.Scanner;
public class WifiDiagno {
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\n");
System.out.println( "Are you able to connect with the internet? (yes or no)");
Scanner kbr= new Scanner(System.in);
answers = kbr.next();
if (answers.equals("yes")) {
System.out.println("Rebooting your computer seemed to work ");
}
else if (answers.equals("no"))
{
System.out.println( "Second step: reboot your router ");
System.out.println("Now are you able to connect with the internet? (yes or no)");
}
else
{System.out.println("try again");}
answers = kbr.next();
if (answers.equals("yes"))
{System.out.println("Rebooting the router seemed to work");}
else if (answers.equals("no"))
{System.out.println("Third step: make sure the cables to your router are plugged in firmly and your router is getting power");
System.out.println(" Now are you able to connect with the internet? (yes or no) ");}
else {System.out.println ("try again");}
answers = kbr.next();
if (answers.equals("yes")) {
System.out.println("Checking the router's cables seemed to work.");}
else if (answers.equals("no"))
{System.out.println( "Fourth step: move your computer closer to your router");
System.out.println("Now are you able to connect with the internet? (yes or no) ");}
else {System.out.println ("try again");}
answers = kbr.next();
if (answers.equals("yes")) {
System.out.println("Moving your computer closer to your router seemed to work.");
}
else if (answers.equals("no"))
{System.out.println( "Fifth step: contact your ISP");
System.out.println("Make sure your ISP is hooked up to your router.");
}
else {System.out.println ("try again");}
}
}