Registered: Dec 2003
All ur three questions are around GRASP patterns , in understanding whom should be responsible for assigning a particular job, and when to create a new class for taking up a job. Refer to chapter 17 of Larman , which explains in detail the application of GRASP pattern . Moreover dont get bogged down with these , since this is not the entirety of UML modelling. Different people look at the same thing with different perspectives. What all u need to do is to allign ur thinking in a particular perspective (which is more object orinetd and more sophisticated).
If a new requirements comes into picture , try drawing the SSD diagrams first . Think of the current domain model , and try to apply the GRASP patterns as to who should be responsible for taking up the job , and if necessary create a new class if none of the class in the current domain model may deem fit for taking up the responsibility. For this there is a good example question in sample ICE test .
Single Select - Please select the best answer (one and only one choice must be selected).
Refer to the exhibits to answer the question.
There are two new requirements for IBMStore.com: discounts for damaged goods, and searches by size and color. Using Figure Sample 2, which of the following is the BEST way to extend the class diagram to handle these requirements?
a) Extend the InventoryProduct class to handle the new requirements.
b) Create a new class "PhysicalProduct" that represents an actual product in the warehouse. Associate the PhysicalProduct with its related InventoryProduct.
c) Add new capabilities to the Inventory class for the management of its Products.
d) No changes are needed due to these requirements.
Refer to the attached jpeg image.
Now lets go with each of the answers . Option 1 says that we should extend the current class , which can solve the problem , but at what cost. It would include lot of redundency . Refer to page 142 of Larman . (Adding Specification Conceptual Classes).
Refer to point C .- This doesn't make sense at all , since these are not the properties of main Inventory class , so can not put these attributes in Inventory class at all .
refer to pint b - This makes the most obvious choice . Since this is the one which describes creating a new class which can handle description class for a type of item.
I hope this would bring some clarity to the situation.
Ppl please join and corrent me if I am wrong anywhere.
This has been downloaded 2109 time(s).
Report this post to a moderator | IP: Logged