13.07.2015 Views

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

Object-Oriented Software Development with UML - UNU-IIST ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating Collaboration Diagrams 117The collaboration diagram for the ÂWÈ`À Ï ÈDßsÓ operation illustrates what happens when the initial problem domainobject is created, rather than how the initial domain object is created. Thus, this collaboration diagramis language independent, and applicable to different languages. Therefore, the creation of a collaborationdiagram for theÂDÈ`À Ï ÈDßsÓ operation starts <strong>with</strong> sending aÒ Ï Æ9À§ÈXÆÖ¤× message to the initial domain object to createit. However, the question is how to choose this initial domain object. One of the following alternativescan be chosen to be the class of the initial domain object:A class representing the entire logical information system.¾A class representing the overall business or organisation.¾Choosing between these alternatives may be influenced by High Cohesion and Low Coupling considerations.Therefore, for the POST application, we can either choose Η٠¿ Ú or¿_È ÐÏ Æ as the initial domain object. Wechoose the¿_È ÐÏ Æ as the Η٠¿ Ú is already chosen as the controller to be responsible for handling the systemoperations.Persistent objects: ÎFÏ;ÐÑ ÌJÒÈL¿§Ó•Æ:ÒÄÔxÒ9À§ÈTÄ Ð ÅIn a realistic application the ÎFÏ;ÐÑ ÌJÒÈL¿§Ó•Æ:ÒÄÔxÒ9À§ÈTÄ Ð Å objects will be maintained in a persistent storage medium,such as relational or object-oriented database. During theÂDÈ`À Ï ÈDßsÓ operation, if there are only a few of theseobjects, they may all be loaded into the computer’s direct memory. However, if there are many, loading themall would consume too much memory or time. More likely, individual objects will be loaded on-demandinto the memory as they are required.The design of how to dynamically on-demand load objects from a database into memory is not consideredin this module. You may have to learn this when you come to do your <strong>Software</strong> Engineering Project inthe next semester. Here, we simply assume that all the ΥϦÐÑ Ì•ÒÈL¿§Ó•Æ9ÒÄÔQÒ9À§ÈTÄ Ð Å can be created in the directmemory.Create the ¿+È ÐÏ Æ and start up the systemFrom the contract ofÂDÈ`À Ï ÈDßJÓ , and the early discussion, the creation of a collaboration diagram1. starts <strong>with</strong> a message Ò Ï Æ:À¥ÈXÆÖ¤× being sent to the¿+È ÐÏ Æ ,2. in order to create the ¿]Ú and to allow it to have visibility and send messages to the the ÎFÏ;ÐÑ ÌJÒÈ:Û]À§È`ÀÁÐ:æ(see the ÆDÅsÈXÆ Ï ÇWÈXÆÉ collaboration diagram), the ¿_È ÐÏ Æ needs to create the ΥϦÐÑ ÌJÒÈ:Û]À§È`ÀÁÐ:æ, representedΗ٠first, byÓ…Ò3. then the ¿+È ÐÏ Æ creates the Λ٠¿ Ú and passes the Ó…Ò as a parameter of the message Ò Ï Æ9À§ÈXÆÖ¤× to theΛ٠¿ Ú .Report No. 259, July 2002<strong>UNU</strong>/<strong>IIST</strong>, P.O. Box 3058, Macau

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!