summaryrefslogtreecommitdiff
path: root/src/Q8/Candidate.java
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2019-05-14 22:16:16 -0600
committermokha <mokha@cisco.com>2019-05-14 22:16:16 -0600
commitc0ef1fd86e3b708794b4fa5c5055aa50c674d74c (patch)
tree9af19714da9daa52ad6ae8ecf6d51fceb7e8f95a /src/Q8/Candidate.java
parent6d6f47896e2d0909ace12fcd4e4a55858df96cb3 (diff)
add main for Q8
Diffstat (limited to 'src/Q8/Candidate.java')
-rw-r--r--src/Q8/Candidate.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Q8/Candidate.java b/src/Q8/Candidate.java
index 2d1241f..7c8809b 100644
--- a/src/Q8/Candidate.java
+++ b/src/Q8/Candidate.java
@@ -10,6 +10,7 @@ package Q8;
import Q1.*;
import java.util.ArrayList;
+import java.util.Scanner;
public class Candidate extends AddressBook {
private double grade = 0.0;
@@ -118,4 +119,29 @@ public class Candidate extends AddressBook {
return eligible;
}
+
+ public static void main(String[] args) {
+ Scanner in = new Scanner(System.in);
+
+ Candidate[] candidates = {
+ 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)
+ };
+
+ for (Candidate candidate : Candidate.getEligibleCandidates(candidates))
+ System.out.print(candidate);
+ }
}