|
|
|
|
49
|
* `Teacher` should declare a `teach` method signature:
|
49
|
* `Teacher` should declare a `teach` method signature:
|
50
|
* Method name: `teach`
|
50
|
* Method name: `teach`
|
51
|
* Method parameters:
|
51
|
* Method parameters:
|
52
|
- * `Student student`
|
|
|
|
|
52
|
+ * `Learner learner`
|
53
|
* `double numberOfHours`
|
53
|
* `double numberOfHours`
|
54
|
* Method return-type: `void`
|
54
|
* Method return-type: `void`
|
55
|
|
55
|
|
56
|
* `Teacher` should declare a `lecture` method signature:
|
56
|
* `Teacher` should declare a `lecture` method signature:
|
57
|
* Method name: `lecture`
|
57
|
* Method name: `lecture`
|
58
|
* Method parameters:
|
58
|
* Method parameters:
|
59
|
- * `Student[] student`
|
|
|
|
|
59
|
+ * `Learner[] learners`
|
60
|
* `double numberOfHours`
|
60
|
* `double numberOfHours`
|
61
|
* Method return-type: `void`
|
61
|
* Method return-type: `void`
|
62
|
|
62
|
|
|
|
|
|
66
|
* Create an `Instructor` class such that:
|
66
|
* Create an `Instructor` class such that:
|
67
|
* `Instructor` is a subclass of `Person`
|
67
|
* `Instructor` is a subclass of `Person`
|
68
|
* `Instructor` implements the `Teacher` interface
|
68
|
* `Instructor` implements the `Teacher` interface
|
69
|
- * `Instructor` should have a concrete implementation of the `teach` method which invokes the `learn` method on the specified `Student` object.
|
|
|
70
|
- * `Instructor` should have a concrete implementation of the `lecture` method which invokes the `learn` method on each of the elements in the specified array of `Student` objects.
|
|
|
71
|
- * `numberOfHours` should be evenly split amongst the students.
|
|
|
72
|
- * `double numberOfHoursPerStudent = numberOfHours / students.length;`
|
|
|
|
|
69
|
+ * `Instructor` should have a concrete implementation of the `teach` method which invokes the `learn` method on the specified `Learner` object.
|
|
|
70
|
+ * `Instructor` should have a concrete implementation of the `lecture` method which invokes the `learn` method on each of the elements in the specified array of `Learner` objects.
|
|
|
71
|
+ * `numberOfHours` should be evenly split amongst the learners.
|
|
|
72
|
+ * `double numberOfHoursPerLearner = numberOfHours / learners.length;`
|
73
|
|
73
|
|
74
|
-
|
74
|
-
|
75
|
### Part 5.0 - Test `Instructor`
|
75
|
### Part 5.0 - Test `Instructor`
|
|
|
|
|
95
|
-
|
95
|
-
|
96
|
### Part 6.0 - Test `People`
|
96
|
### Part 6.0 - Test `People`
|
97
|
* Create a `TestPeople` class.
|
97
|
* Create a `TestPeople` class.
|
98
|
- * Create a `testAdd` method which ensures that our `personList` in our `People` class populated with respective `Student` objects following invokation of the `addStudent` method.
|
|
|
|
|
98
|
+ * Create a `testAdd` method which ensures that our `personList` in our `People` class populated with respective `Person` objects following invokation of the `add` method.
|
99
|
* Create a `testRemove` method which ensures that the `personList` in a `People` object is **depopulated** with a respective `Person` object following the invokation of the `remove` method.
|
99
|
* Create a `testRemove` method which ensures that the `personList` in a `People` object is **depopulated** with a respective `Person` object following the invokation of the `remove` method.
|
100
|
* Create a `testFindById` method which ensures that a respective `Person` object with a respective `id` field is returned upon invokation of the `findById` method on a respective `People` object.
|
100
|
* Create a `testFindById` method which ensures that a respective `Person` object with a respective `id` field is returned upon invokation of the `findById` method on a respective `People` object.
|
101
|
|
101
|
|