diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 00000000..325625e7
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 00000000..63e90019
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 00000000..712ab9d9
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml
new file mode 100644
index 00000000..d4110417
--- /dev/null
+++ b/.idea/libraries/Maven__junit_junit_4_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 00000000..f58bbc11
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..17e19eb4
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..711b3a53
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/interfaces-1.iml b/interfaces-1.iml
new file mode 100644
index 00000000..3c40a7ee
--- /dev/null
+++ b/interfaces-1.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index f0effe12..65b44a67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,6 +5,18 @@
io.zipcoder
interfaces-1
0.0.1-SNAPSHOT
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 11
+ 11
+
+
+
+
jar
interfaces-1
diff --git a/src/main/java/io/zipcoder/interfaces/Educator.java b/src/main/java/io/zipcoder/interfaces/Educator.java
new file mode 100644
index 00000000..592dc1f3
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Educator.java
@@ -0,0 +1,31 @@
+package io.zipcoder.interfaces;
+
+public enum Educator implements Teacher {
+ Leon(111L, "Leon"),
+ Dolio(112L, "Dolio"),
+ Kris(113L, "Kris");
+
+ final Instructor instructor;
+ double timeWorked;
+
+ Educator(Long id, String name) {
+ instructor = new Instructor(id, name);
+ Instructors.getInstance().add(instructor);
+ }
+
+
+ @Override
+ public void teach(Learner learner, double numberOfHours) {
+ learner.learn(numberOfHours);
+ timeWorked += numberOfHours;
+ }
+
+ @Override
+ public void lecture(Learner[] learners, double numberOfHours) {
+ double numberOfHoursPerLearner = (numberOfHours / learners.length);
+ for (Learner learner : learners) {
+ learner.learn(numberOfHoursPerLearner);
+ }
+ timeWorked += numberOfHours;
+ }
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Instructor.java b/src/main/java/io/zipcoder/interfaces/Instructor.java
new file mode 100644
index 00000000..fcc37a93
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Instructor.java
@@ -0,0 +1,27 @@
+package io.zipcoder.interfaces;
+
+public class Instructor extends Person implements Teacher {
+
+ public Instructor(Long id, String name) {
+ super(id, name);
+ }
+
+ @Override
+ public void teach(Learner learner, double numberOfHours) {
+ learner.learn(numberOfHours);
+
+ }
+
+ @Override
+ public void lecture(Learner[] learners, double numberOfHours) {
+
+ double numberOfHoursPerLearner = (numberOfHours / learners.length);
+// for (int i = 0; i < learners.length; i++) {
+// learners[i].learn(numberOfHoursPerLearner);
+
+ for (Learner learner : learners) {
+ learner.learn(numberOfHoursPerLearner);
+ }
+ }
+
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Instructors.java b/src/main/java/io/zipcoder/interfaces/Instructors.java
new file mode 100644
index 00000000..7709a466
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Instructors.java
@@ -0,0 +1,22 @@
+package io.zipcoder.interfaces;
+
+public class Instructors extends People {
+
+ private static final Instructors INSTANCE = new Instructors();
+
+ private Instructors() {
+ add(new Instructor(111L,"Leon"));
+ add(new Instructor(112L,"Dolio"));
+ add(new Instructor(113L,"Kris"));
+ }
+
+ public static Instructors getInstance() {
+ return INSTANCE;
+ }
+
+
+ @Override
+ public Instructor[] toArray() {
+ return personList.toArray(new Instructor[0]);
+ }
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Learner.java b/src/main/java/io/zipcoder/interfaces/Learner.java
new file mode 100644
index 00000000..e516b4aa
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Learner.java
@@ -0,0 +1,8 @@
+package io.zipcoder.interfaces;
+
+public interface Learner {
+
+ void learn(double numberOfHours);
+
+ Double getTotalStudyTime();
+}
diff --git a/src/main/java/io/zipcoder/interfaces/People.java b/src/main/java/io/zipcoder/interfaces/People.java
new file mode 100644
index 00000000..3e1328dc
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/People.java
@@ -0,0 +1,62 @@
+package io.zipcoder.interfaces;
+
+import java.util.ArrayList;
+
+import java.util.Iterator;
+import java.util.List;
+
+public abstract class People implements Iterable {
+
+ List personList = new ArrayList<>();
+
+
+
+ public void add(E person) {
+ personList.add(person);
+ }
+
+ public E findById(Long id) {
+ for(E person : personList){
+ if (person.getId() == (id)) {
+ return person;
+ }
+ }
+ return null;
+ }
+
+ public Boolean contains(Person person) {
+ //if (personList.contains(person)) {
+ for( Person person1 : personList) {
+ if (person1.getName() == person.name
+ && person1.getId() == person.id) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void remove(Person person) {
+ personList.remove(person);
+ }
+
+ public void remove(Long id) {
+ personList.remove(findById(id));
+ }
+
+ public void removeAll() {
+ personList.clear();
+ }
+
+ public int count(){
+ return personList.size();
+ }
+
+ public abstract E[] toArray();
+
+
+ @Override
+ public Iterator iterator() {
+ Iterator iteratorList = personList.iterator();
+ return iteratorList;
+ }
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Person.java b/src/main/java/io/zipcoder/interfaces/Person.java
index fc6a3ffe..525d3377 100644
--- a/src/main/java/io/zipcoder/interfaces/Person.java
+++ b/src/main/java/io/zipcoder/interfaces/Person.java
@@ -1,5 +1,24 @@
package io.zipcoder.interfaces;
public class Person {
+ final Long id;
+ String name;
+
+ public Person(Long id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
}
diff --git a/src/main/java/io/zipcoder/interfaces/Student.java b/src/main/java/io/zipcoder/interfaces/Student.java
new file mode 100644
index 00000000..6da3a765
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Student.java
@@ -0,0 +1,21 @@
+package io.zipcoder.interfaces;
+
+public class Student extends Person implements Learner {
+
+ public Student(Long id, String name) {
+ super(id, name);
+ }
+
+ double totalStudyTime;
+
+
+ @Override
+ public void learn(double numberOfHours) {
+ totalStudyTime = totalStudyTime + numberOfHours;
+ }
+
+ @Override
+ public Double getTotalStudyTime() {
+ return totalStudyTime;
+ }
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Students.java b/src/main/java/io/zipcoder/interfaces/Students.java
new file mode 100644
index 00000000..c85341e5
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Students.java
@@ -0,0 +1,43 @@
+package io.zipcoder.interfaces;
+
+public class Students extends People {
+
+ private static final Students INSTANCE = new Students();
+
+ private Students(){
+ add(new Student(122L, "Manny"));
+ add(new Student(123L, "ZachK"));
+ add(new Student(124L, "Rex"));
+ add(new Student(125L, "Nisha"));
+ add(new Student(126L, "Bobbi"));
+ add(new Student(127L, "Aidan"));
+ add(new Student(128L, "Charnae"));
+ add(new Student(129L, "Chuck"));
+ add(new Student(130L, "Dee"));
+ add(new Student(131L, "Dipinti"));
+ add(new Student(132L, "Jen"));
+ add(new Student(133L, "Jeremy"));
+ add(new Student(134L, "John"));
+ add(new Student(135L, "ZachS"));
+ add(new Student(136L, "Laura"));
+ add(new Student(137L, "Nathan"));
+ add(new Student(138L, "Nikki"));
+ add(new Student(139L, "Raymond"));
+ add(new Student(140L, "Sean"));
+ add(new Student(141L, "Sitara"));
+ add(new Student(142L, "Tatiana"));
+ add(new Student(143L, "Wesley"));
+
+ }
+
+
+ public static Students getInstance(){
+ return INSTANCE;
+ }
+
+
+ @Override
+ public Student[] toArray() {
+ return personList.toArray(new Student[0]);
+ }
+}
diff --git a/src/main/java/io/zipcoder/interfaces/Teacher.java b/src/main/java/io/zipcoder/interfaces/Teacher.java
new file mode 100644
index 00000000..2c683964
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/Teacher.java
@@ -0,0 +1,8 @@
+package io.zipcoder.interfaces;
+
+public interface Teacher {
+
+ void teach(Learner learner, double numberOfHours);
+
+ void lecture(Learner[] learners, double numberOfHours);
+}
diff --git a/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java b/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java
new file mode 100644
index 00000000..cc05751b
--- /dev/null
+++ b/src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java
@@ -0,0 +1,27 @@
+package io.zipcoder.interfaces;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ZipCodeWilmington {
+ Students students = Students.getInstance();
+ Instructors instructors = Instructors.getInstance();
+
+ public void hostLecture(Teacher teacher, double numberOfHours) {
+ teacher.lecture(students.toArray(), numberOfHours);
+ }
+
+ public void hostLecture(long id, double numberOfHours) {
+ Teacher teacher = instructors.findById(id);
+ teacher.lecture(students.toArray(), numberOfHours);
+ }
+
+ public Map getStudyMap() {
+ Map studentMap = new HashMap<>();
+ for (Student student : students.personList){
+ studentMap.put(student, student.getTotalStudyTime());
+ }
+ return studentMap;
+ }
+
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestEducator.java b/src/test/java/io/zipcoder/interfaces/TestEducator.java
new file mode 100644
index 00000000..33eb6918
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestEducator.java
@@ -0,0 +1,59 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestEducator {
+ @Test
+ public void testTeach() {
+ // Given
+ Educator instructor = Educator.Leon;
+ Student student = Students.getInstance().findById(122L);
+
+ Double expectedStudyTime = 10.0;
+ // When
+ instructor.teach(student,10.0);
+ Double actualStudyTime = student.getTotalStudyTime();
+
+ // Then
+ Assert.assertEquals(expectedStudyTime, actualStudyTime);
+ }
+
+ @Test
+ public void testLecture() {
+ // Given
+ Educator instructor = Educator.Leon;
+ Student student1 = Students.getInstance().findById(122L);
+ Student student2 = Students.getInstance().findById(123L);
+ Student[] students = new Student[] {student1, student2};
+
+ Double expectedStudyTimePerStudent = 10.0 / students.length;
+
+ // When
+ instructor.lecture(students,10.0);
+ Double actualStudyTimePerStudent = student1.getTotalStudyTime();
+
+ // Then
+ Assert.assertEquals(expectedStudyTimePerStudent,actualStudyTimePerStudent);
+ }
+
+ @Test
+ public void testTimeWorked() {
+ // Given
+ Educator instructor = Educator.Dolio;
+ Student student1 = Students.getInstance().findById(122L);
+ Student student2 = Students.getInstance().findById(123L);
+ Student[] students = new Student[] {student1, student2};
+
+ Double expectedTimeWorked = 20.0;
+ // When
+ instructor.teach(student1, 10.0);
+ instructor.lecture(students, 10.0);
+ Double actualTimeWorked = Educator.Dolio.timeWorked;
+
+ // Then
+ Assert.assertEquals(expectedTimeWorked,actualTimeWorked);
+
+ }
+
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestInstructor.java b/src/test/java/io/zipcoder/interfaces/TestInstructor.java
new file mode 100644
index 00000000..b84fc9f9
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestInstructor.java
@@ -0,0 +1,58 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestInstructor {
+ @Test
+ public void testImplementation() {
+ // Given
+ Instructor instructor = new Instructor(null, null);
+ // Then
+ Assert.assertTrue(instructor instanceof Teacher);
+ }
+
+ @Test
+ public void testInterface() {
+ // Given
+ Instructor instructor = new Instructor(null, null);
+ // Then
+ Assert.assertTrue(instructor instanceof Person);
+ }
+
+ @Test
+ public void testTeach() {
+ // Given
+ Instructor instructor = new Instructor(null, null);
+ Student student1 = new Student(null, "Jawnay");
+ Double expectedStudyTime = 10.0;
+ // When
+ instructor.teach(student1,10.0);
+ Double actualStudyTime = student1.getTotalStudyTime();
+ // Then
+ Assert.assertEquals(expectedStudyTime, actualStudyTime);
+ }
+
+ @Test
+ public void testLecture() {
+ // Given
+// List studentList = new ArrayList<>();
+// studentList.add(new Student(null, null));
+ Instructor instructor = new Instructor(null, null);
+ Student student1 = new Student(null, "Jawn");
+ Student student2 = new Student(null, "Jawnay");
+ Student student3 = new Student(null, "JawnyJawn");
+ Student[] students = new Student[]{student1, student2, student3};
+ Double expectedStudyTimePerStudent = 10.0 / students.length;
+
+ // When
+ instructor.lecture(students,10.0);
+ Double actualStudyTimePerStudent = student1.getTotalStudyTime();
+ // Then
+ Assert.assertEquals(expectedStudyTimePerStudent,actualStudyTimePerStudent);
+ }
+
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestInstructors.java b/src/test/java/io/zipcoder/interfaces/TestInstructors.java
new file mode 100644
index 00000000..de072514
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestInstructors.java
@@ -0,0 +1,29 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.List;
+
+public class TestInstructors {
+ @Test
+ public void testInstructorInstance() {
+ // Given
+ Instructors instructors = Instructors.getInstance();
+ Instructor leon = new Instructor(111L, "Leon");
+ Instructor dolio = new Instructor(112L, "Dolio");
+ Instructor kris = new Instructor(113L, "Kris");
+
+ // When
+ boolean containsLeon = instructors.contains(leon);
+ boolean containsDolio = instructors.contains(dolio);
+ boolean containsKris = instructors.contains(kris);
+
+
+ // Then
+ Assert.assertTrue(containsLeon);
+ Assert.assertTrue(containsDolio);
+ Assert.assertTrue(containsKris);
+
+ }
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestPeople.java b/src/test/java/io/zipcoder/interfaces/TestPeople.java
new file mode 100644
index 00000000..fdc4d071
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestPeople.java
@@ -0,0 +1,59 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class TestPeople {
+
+ @Test
+ public void testAdd() {
+ // Given
+ List personList = new ArrayList<>();
+ Person person1;
+
+ // When
+ personList.add(person1 = new Person(null, "Jawn"));
+
+ // Then
+ Assert.assertTrue(personList.contains(person1));
+ }
+
+ @Test
+ public void testRemove() {
+ // Given
+ List personList = new ArrayList<>();
+ Person person1;
+ Person person2;
+ personList.add(person1 = new Person(null, "Jawn"));
+ personList.add(person2 = new Person(null, "Jawnay"));
+
+ // When
+ personList.remove(person1);
+
+ // Then
+ Assert.assertFalse(personList.contains(person1));
+ Assert.assertTrue(personList.contains(person2));
+ }
+
+ @Test
+ public void testFindById() {
+ // Given
+ Students student = Students.getInstance();
+ Long expectedId = 122L;
+ String expectedName = "Manny";
+
+ // When
+ Student actualStudent = student.findById(122L);
+ String actualName = actualStudent.getName();
+ Long actualId = actualStudent.getId();
+
+ // Then
+ Assert.assertEquals(expectedId, actualId);
+ Assert.assertEquals(expectedName, actualName);
+
+ }
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestPerson.java b/src/test/java/io/zipcoder/interfaces/TestPerson.java
index d64cd2f0..3851b667 100644
--- a/src/test/java/io/zipcoder/interfaces/TestPerson.java
+++ b/src/test/java/io/zipcoder/interfaces/TestPerson.java
@@ -1,5 +1,38 @@
package io.zipcoder.interfaces;
+import org.junit.Assert;
+import org.junit.Test;
+
public class TestPerson {
+ @Test
+ public void testConstructor() {
+ // Given
+ Long expectedId = Long.MAX_VALUE;
+ String expectedName = "Name Of Person";
+ Person person = new Person(expectedId, expectedName);
+
+ // When
+ Long actualId = person.getId();
+ String actualName = person.getName();
+
+ // Then
+ Assert.assertEquals(expectedId, actualId);
+ Assert.assertEquals(expectedName, actualName);
+ }
+
+ @Test
+ public void testSetName() {
+ // Given
+ Person person = new Person(null,null);
+ person.setName("Jawnay");
+
+ String expectedName = "Jawnay";
+ // When
+ String actualName = person.getName();
+
+ // Then
+ Assert.assertEquals(actualName, expectedName);
+
+ }
}
diff --git a/src/test/java/io/zipcoder/interfaces/TestStudent.java b/src/test/java/io/zipcoder/interfaces/TestStudent.java
new file mode 100644
index 00000000..0ba29807
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestStudent.java
@@ -0,0 +1,38 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestStudent {
+ @Test
+ public void testImplementation() {
+ // Given
+ Student student = new Student(null, null);
+ // Then
+ Assert.assertTrue(student instanceof Learner);
+ }
+
+ @Test
+ public void testInheritance() {
+ // Given
+ Student student = new Student(null, null);
+ // Then
+ Assert.assertTrue(student instanceof Person);
+ }
+
+ @Test
+ public void testLearn() {
+ // Given
+ Student student = new Student(null,"Jawnay");
+
+ Double expectedStudyTime = 20.0;
+
+ // When
+ student.learn(20.0);
+ Double actualStudyTime = student.getTotalStudyTime();
+
+ // Then
+ Assert.assertEquals(expectedStudyTime, actualStudyTime);
+ }
+
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestStudents.java b/src/test/java/io/zipcoder/interfaces/TestStudents.java
new file mode 100644
index 00000000..2e9aafdd
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestStudents.java
@@ -0,0 +1,49 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.List;
+
+public class TestStudents {
+ @Test
+ public void testCohortInstance() {
+ // Given
+ Students students = Students.getInstance();
+ // created a student with same id and name for each
+ Student Manny = new Student(122L, "Manny");
+ Student ZachK = new Student(123L, "ZachK");
+ Student Rex = new Student(124L, "Rex");
+ Student Nisha = new Student(125L, "Nisha");
+ Student Bobbi = new Student(126L, "Bobbi");
+ Student Aidan = new Student(127L, "Aidan");
+ Student Charnae = new Student(128L, "Charnae");
+ Student Chuck = new Student(129L, "Chuck");
+ Student Dee = new Student(130L, "Dee");
+ Student Dipinti = new Student(131L, "Dipinti");
+ Student Jen = new Student(132L, "Jen");
+ Student Jeremy = new Student(133L, "Jeremy");
+ Student John = new Student(134L, "John");
+ Student ZachS = new Student(135L, "ZachS");
+ Student Laura = new Student(136L, "Laura");
+ Student Nathan = new Student(137L, "Nathan");
+ Student Nikki = new Student(138L, "Nikki");
+ Student Raymond = new Student(139L, "Raymond");
+ Student Sean = new Student(140L, "Sean");
+ Student Sitara = new Student(141L, "Sitara");
+ Student Tatiana = new Student(142L, "Tatiana");
+ Student Wesley = new Student(143L, "Wesley");
+
+ // When
+ // boolean that checks if students contains the student created in given
+ boolean containsManny = students.contains(Manny);
+ boolean containsZachK = students.contains(ZachK);
+ boolean containsRex = students.contains(Rex);
+
+ // Then
+ // assert true for everyone
+ Assert.assertTrue(containsManny);
+ Assert.assertTrue(containsZachK);
+ Assert.assertTrue(containsRex);
+ }
+}
diff --git a/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java b/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java
new file mode 100644
index 00000000..ecbbf46c
--- /dev/null
+++ b/src/test/java/io/zipcoder/interfaces/TestZipCodeWilmington.java
@@ -0,0 +1,29 @@
+package io.zipcoder.interfaces;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Map;
+
+public class TestZipCodeWilmington {
+ @Test
+ public void testHostLecture() {
+ // Given
+ Students students = Students.getInstance();
+ Educator instructor = Educator.Leon;
+ //Instructors instructors = Instructors.getInstance();
+
+ Double expectedTime = 20.0 / students.personList.size();
+
+ // When
+ ZipCodeWilmington zipcode = new ZipCodeWilmington();
+ zipcode.hostLecture(instructor,20.0);
+ Map getMap = zipcode.getStudyMap();
+ Double actualTime = getMap.get(students.findById(122L));
+
+
+ // Then
+ Assert.assertEquals(expectedTime, actualTime);
+
+ }
+}