Suggest a simple scheme for creating a new class SafeMember that would allow us to export a reference to a Member. The classes outside the system should be unaware of this additional class, and access the reference like a reference to a Member object. However, the reference would not allow the integrity of the data to be compromised. Remember that when designing the “Return Book with fines” use case, Member object is returned to the UserInterface to be able to display the member information such as owed fine. But this also means that the UserInterface can access all the Member methods. Your implementation of SafeMember class should prevent this.
A new class safe member that would allow us to export a reference to a member
Suggest a simple scheme for creating a new class SafeMember that would allow us to export a reference to a Member. The classes outside the system should be unaware of this additional class, and access the reference like a reference to a Member object. However, the reference would not allow the integrity of the data to be compromised. Remember that when designing the “Return Book with fines” use case, Member object is returned to the UserInterface to be able to display the member information such as owed fine. But this also means that the UserInterface can access all the Member methods. Your implementation of SafeMember class should prevent this.
Step by step
Solved in 2 steps with 2 images