Getter and setter methods
|
|
-
Allow for change of implementation.
-
Allow for non-business logic concerns. Examples:
-
Logging
-
Adding persistence
-
|
|
No. 92
Implementing getter methods
Q: |
We reconsider the getter/setter based implementation in Figure 216, “Implementation by minutes only ”:
Complete the two getter methods' implementation. TipKeep in mind a day's duration being 86400 the |
A: |
|