Commit cd22826

mokha <mokha@cisco.com>
2019-05-05 20:45:48
set up test data for problem 8.
1 parent 7875a0e
Changed files (3)
assignments
assignment1
src
main
java
ca
mokhan
assignment1
test
java
ca
mokhan
assignments/assignment1/src/main/java/ca/mokhan/assignment1/Candidate.java
@@ -0,0 +1,22 @@
+package ca.mokhan.assignment1;
+
+public class Candidate extends AddressBook {
+  private double grade = 0.0;
+  private String communication;
+  private boolean innovation;
+  private double regulatoryCapability;
+
+  public Candidate(
+      String firstName,
+      String lastName,
+      double grade,
+      String communication,
+      boolean innovation,
+      double regulatoryCapability) {
+    super(firstName, "", lastName);
+    this.grade = grade;
+    this.communication = communication;
+    this.innovation = innovation;
+    this.regulatoryCapability = regulatoryCapability;
+  }
+}
assignments/assignment1/src/test/java/ca/mokhan/assignment1/CandidateTest.java
@@ -0,0 +1,37 @@
+package ca.mokhan.assignment1;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class CandidateTest extends TestCase {
+  private Candidate[] runners = {
+    new Candidate("Elena", "Brandon", 82.30, "poor", true, 0.5),
+    new Candidate("Thomas", "Molson", 85.10, "poor", false, 1.0),
+    new Candidate("Hamilton", "Winn", 77.77, "average", false, 0.8),
+    new Candidate("Suzie", "Sarandin", 69.93, "average", false, 0.0),
+    new Candidate("Philip", "Winne", 93.03, "average", true, 1.0),
+    new Candidate("Alex", "Trebok", 88.61, "poor", true, 0.7),
+    new Candidate("Emma", "Pivoto", 55.99, "excellent", false, 0.8),
+    new Candidate("John", "Lenthen", 87.49, "excellent", true, 0.9),
+    new Candidate("James", "Lean", 88.00, "excellent", false, 0.5),
+    new Candidate("Jane", "Ostin", 91.20, "average", true, 0.6),
+    new Candidate("Emily", "Car", 66.79, "excellent", false, 0.3),
+    new Candidate("Daniel", "Hamshire", 76.65, "average", true, 0.2),
+    new Candidate("Neda", "Bazdar", 55.89, "excellent", true, 0.5),
+    new Candidate("Aaron", "Smith", 90.01, "excellent", false, 0.3),
+    new Candidate("Kate", "Hen", 87.9, "poor", false, 0.8)
+  };
+
+  public CandidateTest(String testName) {
+    super(testName);
+  }
+
+  public static Test suite() {
+    return new TestSuite(CandidateTest.class);
+  }
+
+  public void testGetEligibleCandidates() {
+    assertTrue(true);
+  }
+}
assignments/assignment1/README.md
@@ -212,7 +212,7 @@ The criteria for selection are as follows:
 * III. Innovation as one of the two values – "brilliant" and "average" (store as a Boolean; brilliant = true and average = false).
   The fifteen candidates have the following innovative abilities: brilliant, average, average, average, brilliant, brilliant, average, brilliant, average, brilliant, average, brilliant, brilliant, average, average.
 * IV. Ability to regulate one’s own skill as a probability value between 0 and 1.0 – 1.0 implies excellent regulatory capabilities and 0.0 implies no skills to regulate (store as a double).
-The fifteen candidates have the following regulatory abilities: 0.5, 1.0, 0.8, 0.0, 1.0, 0.7, 0.8, 0,9, 0.5, 0.6, 0.3, 0.2, 0.5, 0.3, 0.8.
+  The fifteen candidates have the following regulatory abilities: 0.5, 1.0, 0.8, 0.0, 1.0, 0.7, 0.8, 0.9, 0.5, 0.6, 0.3, 0.2, 0.5, 0.3, 0.8.
 
 Store these values for the fifteen candidates in an extended AddressBook class.