Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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!

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions

Question

Explain the concept of dominance. How is it used?

Answered: 1 week ago

Question

What is output? > > var 1 = 3 . 9 ; > > var 2 = 9 0 ; > > who

Answered: 1 week ago