|
@@ -4,8 +4,8 @@
|
4
|
4
|
|
5
|
5
|
# Part 1.1 - Create `Person` Class
|
6
|
6
|
* Create a `Person` class.
|
7
|
|
- * `Person` constructor should have a parameter of type `String` which sets the `name` instance-variable to the respective value.
|
8
|
7
|
* The class should declare a `final` field named `id` of type `long`.
|
|
8
|
+ * `Person` constructor should have a parameter of type `long` which sets the `id` field to the respective value.
|
9
|
9
|
* The class should define a `getId()` method which returns the `Person` object's `id` field.
|
10
|
10
|
* The class should define a `getName()` method which returns the `Person` object's `name` field.
|
11
|
11
|
* The class should define a `setName()` method which sets the `Person` object's `name` field.
|
|
@@ -13,6 +13,7 @@
|
13
|
13
|
-
|
14
|
14
|
# Part 1.0 - Test `Person`
|
15
|
15
|
* Create a `TestPerson` class.
|
|
16
|
+ * Create a `testConstructor` method which ensures that a `Person` object's `id` field is being set upon construction.
|
16
|
17
|
* Create a `testSetName` method which ensures that a `Person` object's `name` variable is being set by invoking the `.setName` method.
|
17
|
18
|
* Create a `testConstructor` method which ensures that a `Person` object's `name` variable is being set by invoking the `Person` constructor.
|
18
|
19
|
|