瀏覽代碼

done up to part 10. ZCW class tests failing from NPE when attempting to iterate through instructors

jasamuels 6 年之前
父節點
當前提交
b63d1a480b

+ 12
- 0
src/main/java/io/zipcoder/interfaces/Instructors.java 查看文件

@@ -0,0 +1,12 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class Instructors {
4
+    private static Instructors ourInstance = new Instructors();
5
+
6
+    public static Instructors getInstance() {
7
+        return ourInstance;
8
+    }
9
+
10
+    private Instructors() {
11
+    }
12
+}

+ 12
- 0
src/main/java/io/zipcoder/interfaces/Students.java 查看文件

@@ -0,0 +1,12 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class Students {
4
+    private static Students ourInstance = new Students();
5
+
6
+    public static Students getInstance() {
7
+        return ourInstance;
8
+    }
9
+
10
+    private Students() {
11
+    }
12
+}

+ 12
- 0
src/main/java/io/zipcoder/interfaces/ZipCodeWilmington.java 查看文件

@@ -0,0 +1,12 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class ZipCodeWilmington {
4
+    private static ZipCodeWilmington ourInstance = new ZipCodeWilmington();
5
+
6
+    public static ZipCodeWilmington getInstance() {
7
+        return ourInstance;
8
+    }
9
+
10
+    private ZipCodeWilmington() {
11
+    }
12
+}

+ 4
- 0
src/test/java/io/zipcoder/interfaces/InstructorsTest.java 查看文件

@@ -0,0 +1,4 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class InstructorsTest {
4
+}

+ 4
- 0
src/test/java/io/zipcoder/interfaces/StudentsTest.java 查看文件

@@ -0,0 +1,4 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class StudentsTest {
4
+}

+ 4
- 0
src/test/java/io/zipcoder/interfaces/ZipCodeWilmingtonTest.java 查看文件

@@ -0,0 +1,4 @@
1
+package io.zipcoder.interfaces;
2
+
3
+public class ZipCodeWilmingtonTest {
4
+}