|
@@ -1,11 +1,11 @@
|
1
|
|
-# Part 1.0 - Create `Person` Class
|
|
1
|
+# Part 1.1 - Create `Person` Class
|
2
|
2
|
* Create a `Person` class.
|
3
|
3
|
* `Person` constructor should have a parameter of type `String` which sets the `name` instance-variable to the respective value.
|
4
|
4
|
* `Person` should have a `getName()` method which returns the `Person` object's `name` variable.
|
5
|
5
|
* `Person` should have a `setName()` method which sets the `Person` object's `name` variable.
|
6
|
6
|
|
7
|
7
|
-
|
8
|
|
-# Part 1.1 - Test `Person`
|
|
8
|
+# Part 1.0 - Test `Person`
|
9
|
9
|
* Create a `TestPerson` class.
|
10
|
10
|
* Create a `testSetName` method which ensures that a `Person` object's `name` variable is being set by invoking the `.setName` method.
|
11
|
11
|
* Create a `testConstructor` method which ensures that a `Person` object's `name` variable is being set by invoking the `Person` constructor.
|
|
@@ -19,7 +19,7 @@
|
19
|
19
|
* Method return-type: `void`
|
20
|
20
|
|
21
|
21
|
-
|
22
|
|
-# Part 3.0 - Create `Student` Class
|
|
22
|
+# Part 3.1 - Create `Student` Class
|
23
|
23
|
* Create a `Student` class such that:
|
24
|
24
|
* `Student` is a subclass of `Person`
|
25
|
25
|
* `Student` implements the `Learner` interface
|
|
@@ -29,7 +29,7 @@
|
29
|
29
|
|
30
|
30
|
|
31
|
31
|
-
|
32
|
|
-# Part 3.1 - Test `Student`
|
|
32
|
+# Part 3.0 - Test `Student`
|
33
|
33
|
* Create a `TestStudent` class.
|
34
|
34
|
* Create a `testImplementation` method that asserts that a `Student` is an `instanceof` a `Learner`.
|
35
|
35
|
* Create a `testInheritance` method that asserts that a `Student` is an `instanceof` a `Person`.
|
|
@@ -53,7 +53,7 @@
|
53
|
53
|
|
54
|
54
|
|
55
|
55
|
-
|
56
|
|
-# Part 5.0 - Create `Instructor` Class
|
|
56
|
+# Part 5.1 - Create `Instructor` Class
|
57
|
57
|
* Create an `Instructor` class such that:
|
58
|
58
|
* `Instructor` is a subclass of `Person`
|
59
|
59
|
* `Instructor` implements the `Teacher` interface
|
|
@@ -63,7 +63,7 @@
|
63
|
63
|
* `double numberOfHoursPerStudent = numberOfHours / students.length;`
|
64
|
64
|
|
65
|
65
|
-
|
66
|
|
-# Part 5.1 - Test `Instructor`
|
|
66
|
+# Part 5.0 - Test `Instructor`
|
67
|
67
|
* Create an `TestInstructor` class.
|
68
|
68
|
* Create a `testImplementation` method that asserts that an `Instructor` is an `instanceof` a `Teacher`.
|
69
|
69
|
* Create a `testInheritance` method that asserts that a `Instructor` is an `instanceof` a `Person`.
|
|
@@ -72,7 +72,7 @@
|
72
|
72
|
|
73
|
73
|
|
74
|
74
|
-
|
75
|
|
-# Part 6 - Create `ZipCodeWilmington` Class
|
|
75
|
+# Part 6.1 - Create `ZipCodeWilmington` Class
|
76
|
76
|
* Create a `ZipCodeWilmington` class.
|
77
|
77
|
* _Statically_ instantiate a `private` `ArrayList` of `Instructor` objects called `instructorList`.
|
78
|
78
|
* Create a `public static` method called `hire` which adds an `Instructor` to the `instructorList` and returns `void`.
|
|
@@ -92,7 +92,7 @@ static { // static initializer
|
92
|
92
|
|
93
|
93
|
|
94
|
94
|
-
|
95
|
|
-# Part 6.1 - Test `ZipCodeWilmington`
|
|
95
|
+# Part 6.0 - Test `ZipCodeWilmington`
|
96
|
96
|
* Create a `TestZipCodeWilmington` class.
|
97
|
97
|
* Create a method named `setup` which is annotated with `@Before`, takes has no parameters, and returns `void`.
|
98
|
98
|
* Ensure this method invokes the `.fireStaff` method on `ZipCodeWilmington`
|
|
@@ -101,7 +101,7 @@ static { // static initializer
|
101
|
101
|
* Create a `testHireStaff` method which ensures that our `instructorList` is populated with respective `Instructor` objects.
|
102
|
102
|
|
103
|
103
|
-
|
104
|
|
-# Part 7 - Create `TechConnect` Class
|
|
104
|
+# Part 7.1 - Create `TechConnect` Class
|
105
|
105
|
* Create a `TechConnect` class.
|
106
|
106
|
* _Statically_ instantiate a `private` `ArrayList` of `Student` objects called `studentList`.
|
107
|
107
|
* Create a `public static` method called `recruitStudent` which adds a `Student` to the `studentList` and returns `void`.
|
|
@@ -125,7 +125,7 @@ static { // static initializer
|
125
|
125
|
|
126
|
126
|
|
127
|
127
|
-
|
128
|
|
-# Part 7.1 - Test `TechConnect`
|
|
128
|
+# Part 7.0 - Test `TechConnect`
|
129
|
129
|
* Create a `TestTechConnect` class.
|
130
|
130
|
* Create a method named `setup` which is annotated with `@Before`, takes has no parameters, and returns `void`.
|
131
|
131
|
* Ensure this method invokes the `.removeStudents` method on `TechConnect`
|
|
@@ -134,13 +134,13 @@ static { // static initializer
|
134
|
134
|
* Create a `testRecruitStudent` method which ensures that our `studentList` is populated with respective `Student` objects.
|
135
|
135
|
|
136
|
136
|
-
|
137
|
|
-# Part 8 - Create `ClassRoom` Class
|
|
137
|
+# Part 8.1 - Create `ClassRoom` Class
|
138
|
138
|
* Create a `ClassRoom` class.
|
139
|
139
|
* _Statically_ instantiate a `private` `ArrayList` of `Student` objects called `students` by invoking the `getStudents` method on the `TechConnect` class.
|
140
|
140
|
* _Statically_ instantiate a `private` `ArrayList` of `Instructor` objects called `instructors` by invoking the `getInstructor` method on the `ZipCodeWilmington` class.
|
141
|
141
|
* Create a method named `getRoster` which returns a `HashMapping` of `String` to `Person` objects such that our `ZipCodeWilmington` instructors and `TechConnect` students' names map to their respective `Person` object.
|
142
|
142
|
|
143
|
143
|
-
|
144
|
|
-# Part 8.1 - Test `ClassRoom`
|
|
144
|
+# Part 8.0 - Test `ClassRoom`
|
145
|
145
|
* Create a `TestClassRoom` class.
|
146
|
146
|
* Assert that the `HashMapping` returned by `getRoster`, returns a `valueSet` containing each of the `Person` objects in `ZipCodeWilmington`'s `instructorList` and `TechConnect`'s `studentList`.
|