Question: I am trying to implement the Command pattern to my Library System. I have created a BorrowItem command so that the Screen/Invoker will be able
I am trying to implement the Command pattern to my Library System. I have created a "BorrowItem" command so that the Screen/Invoker will be able to get an Item from the Library. For the receiver, I have put my "Item" class which has a +getItem() method to access an Item from the repository class.
I chose Librarian as the client because it controls the command execution process and the screen as the invoker because it executes without knowing the implementation.
I am just unsure if the Item class is a good option for being the receiver. I understand that a receiver is what performs the set of actions and since it has the getItem() method, I thought the Item class would make the most sense. Thank you for the help!

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
