-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebBrowser.java
More file actions
29 lines (25 loc) · 870 Bytes
/
Copy pathWebBrowser.java
File metadata and controls
29 lines (25 loc) · 870 Bytes
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
import java.util.Scanner;
public class WebBrowser {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for (int i = 1; i <= t; i++) {
System.out.println("Case "+ i +":");
String command;
String[] forwardStack = new String[100];
String[] backwardStack = new String[100];
int forwardStackIndex = 0;
int backwardStackIndex = 0;
do {
command = scanner.nextLine();
//uncompleted
if (command.equals("VISIT")) {
}
else if (command.equals("BACK")) {
}
else if (command.equals("FORWARD")) {
}
}while (command.equals("QUIT"));
}
}
}