-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
37 lines (33 loc) · 1.2 KB
/
Main.java
File metadata and controls
37 lines (33 loc) · 1.2 KB
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
import java.util.ArrayList;
public class Main {
public static void main(String[] args)
{
//test 1
ArrayList<String> arrayInputOne = new ArrayList<String>();
arrayInputOne.add("an");
arrayInputOne.add("band");
arrayInputOne.add("band");
WordChecker f = new WordChecker(arrayInputOne);
boolean info = f.isWordChain();
System.out.println(info);
//test 2
ArrayList<String> arrayInputTwo = new ArrayList<String>();
arrayInputTwo.add("to");
arrayInputTwo.add("too");
arrayInputTwo.add("stool");
arrayInputTwo.add("tools");
WordChecker g = new WordChecker(arrayInputTwo);
info = g.isWordChain();
System.out.println(info);
ArrayList<String> arrayInputThree = new ArrayList<>();
arrayInputThree.add("catch");
arrayInputThree.add("bobcat");
arrayInputThree.add("catchacat");
arrayInputThree.add("cat");
arrayInputThree.add("at");
WordChecker h = new WordChecker(arrayInputThree);
System.out.println(h.createList("cat"));
System.out.println(h.createList("catch"));
System.out.println(h.createList("dog"));
}
}