Skip to content
Browse files

Added Version 4, split them up 3 per

  • Loading branch information...
1 parent 81a483c commit 6927765681bf6db792a333449a21165589892047 Ignacio committed
View
12 Assignment3E/.classpath
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
29 Assignment3E/src/customerSearch/driver/Driver.java
@@ -17,31 +17,12 @@
public static void main(String[] args)
{
- Scanner userInputScan;
- ArrayList<String> userInput = new ArrayList<String>();
- try {
- userInputScan = new Scanner(new File(".\\userInputs.txt"));
-
- while (userInputScan.hasNextLine()) {
-
- userInput.add(userInputScan.nextLine());
- }
- }
- catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ //V1
+ SeaGateDrive1 sg1 = new SeaGateDrive1();
+ SeaGateDrive1 sg1 = new SeaGateDrive1();
+ SeaGateDrive1 sg1 = new SeaGateDrive1();
+ SeaGateDrive1 sg1 = new SeaGateDrive1();
- finally{
-
- }
-
-
- SearchStrategy test = new SemanticMatch();
-
- test.search("processor", "If Windows 7 has a processor problem");
-
- //ArrayList userInput = new ArrayList();
}
View
6 ...arch/products/Version1/SeaGateDrive4.java → ...arch/products/Version2/SeaGateDrive4.java
@@ -1,12 +1,14 @@
-package customerSearch.products.Version1;
+package customerSearch.products.Version2;
import java.util.ArrayList;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version1.SeaGateDriveV1;
import customerSearch.util.FileEnums;
-public class SeaGateDrive4 extends SeaGateDriveV1
+public class SeaGateDrive4 extends SeaGateDriveV2
{
SeaGateDrive4()
{
View
6 ...arch/products/Version2/SeaGateDrive7.java → ...arch/products/Version3/SeaGateDrive7.java
@@ -1,12 +1,14 @@
-package customerSearch.products.Version2;
+package customerSearch.products.Version3;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version2.SeaGateDriveV2;
import customerSearch.util.FileEnums;
import java.util.ArrayList;
-public class SeaGateDrive7 extends SeaGateDriveV2
+public class SeaGateDrive7 extends SeaGateDriveV3
{
SeaGateDrive7()
{
View
6 ...arch/products/Version2/SeaGateDrive8.java → ...arch/products/Version3/SeaGateDrive8.java
@@ -1,11 +1,13 @@
-package customerSearch.products.Version2;
+package customerSearch.products.Version3;
import java.util.ArrayList;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version2.SeaGateDriveV2;
import customerSearch.util.FileEnums;
-public class SeaGateDrive8 extends SeaGateDriveV2
+public class SeaGateDrive8 extends SeaGateDriveV3
{
SeaGateDrive8()
{
View
6 ...rch/products/Version3/SeaGateDrive10.java → ...rch/products/Version4/SeaGateDrive10.java
@@ -1,11 +1,13 @@
-package customerSearch.products.Version3;
+package customerSearch.products.Version4;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version3.SeaGateDriveV3;
import customerSearch.util.FileEnums;
import java.util.ArrayList;
-public class SeaGateDrive10 extends SeaGateDriveV3
+public class SeaGateDrive10 extends SeaGateDriveV4
{
SeaGateDrive10()
{
View
6 ...rch/products/Version3/SeaGateDrive11.java → ...rch/products/Version4/SeaGateDrive11.java
@@ -1,11 +1,13 @@
-package customerSearch.products.Version3;
+package customerSearch.products.Version4;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version3.SeaGateDriveV3;
import customerSearch.util.FileEnums;
import java.util.ArrayList;
-public class SeaGateDrive11 extends SeaGateDriveV3
+public class SeaGateDrive11 extends SeaGateDriveV4
{
SeaGateDrive11()
{
View
6 ...rch/products/Version3/SeaGateDrive12.java → ...rch/products/Version4/SeaGateDrive12.java
@@ -1,11 +1,13 @@
-package customerSearch.products.Version3;
+package customerSearch.products.Version4;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
+
+import customerSearch.products.Version3.SeaGateDriveV3;
import customerSearch.util.FileEnums;
import java.util.ArrayList;
-public class SeaGateDrive12 extends SeaGateDriveV3
+public class SeaGateDrive12 extends SeaGateDriveV4
{
SeaGateDrive12()
{
View
13 Assignment3E/src/customerSearch/util/CompleteSearchVisitor.java
@@ -8,6 +8,7 @@
import customerSearch.products.Version1.SeaGateDriveV1;
import customerSearch.products.Version2.SeaGateDriveV2;
import customerSearch.products.Version3.SeaGateDriveV3;
+import customerSearch.products.Version4.SeaGateDriveV4;
public class CompleteSearchVisitor implements ProductVisitor
{
@@ -47,4 +48,16 @@ public void visit(SeaGateDriveV3 drive)
SearchStrategy semanticMatch = new SemanticMatch();
semanticMatch.search(drive.getDescription());
}
+ public void visit(SeaGateDriveV4 drive)
+ {
+ SearchStrategy exactMatch = new ExactMatch();
+ exactMatch.search(drive.getDescription());
+
+ SearchStrategy naiveMatch = new NaiveMatching();
+ naiveMatch.search(drive.getDescription());
+
+ SearchStrategy semanticMatch = new SemanticMatch();
+ semanticMatch.search(drive.getDescription());
+ }
}
+
View
2 Assignment3E/src/customerSearch/util/ProductVisitor.java
@@ -3,11 +3,13 @@
import customerSearch.products.Version1.SeaGateDriveV1;
import customerSearch.products.Version2.SeaGateDriveV2;
import customerSearch.products.Version3.SeaGateDriveV3;
+import customerSearch.products.Version4.SeaGateDriveV4;
public interface ProductVisitor{
public void visit(SeaGateDriveV1 drive);
public void visit(SeaGateDriveV2 drive);
public void visit(SeaGateDriveV3 drive);
+ public void visit(SeaGateDriveV4 drive);
}

0 comments on commit 6927765

Please sign in to comment.
Something went wrong with that request. Please try again.