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