Object+Diagram

Unified Modeling Language Object Diagrams Group Members: Souban Sheikh, Omer Bin Asad, Muhammad Daniyal Shafiq, Umair Ali
 * __Summary:__**

Object diagram are special cases of a class diagrams.They are very useful in understanding class diagrams.THey are not different from class diagram but reflect multiplicity and roles.Object diagrams represent objects i.e. instantiated objects of the classes, and relationships between these objects and relationships of these objects to static classes. As opposed to class diagrams which shows static classes and relationships between them, object diagrams show objects and relationship between them at runtime. It is useful when real situation is to be shown. Object diagrams are more specific as compared to class diagrams. In object diagrams, the attributes and operatoins of the classes gets value of the particular instance/object. So, it consist of value of the attributes and operations rather than just their names. It is as shown in the diagram below. the above diagram show two classes in which a college can have many students studying in it. This is a class diagram. And its corresponding object diagram is below.

Now this is Object diagram in it attributes of UNIVNAME has a value of UNIVERSITY OF CHICAGO. Now its quite clear that each attribute in the above object diagram has its own value. This is the difference between the object diagrams and class diagrams, although both use the same notations to depict them.

Object diagram is a static representation of an object system, at a particular time, that is aimed to test the accuracy of the diagram. In a class diagram, you would not get the picture of how these classes interact with each other at runtime, and in the actual system. how the objects created at runtime are related to the classes. Object diagrams depict the relation between instantiated and defined classes, and the relation between these objects, in a logical view.Object diagram shows the similar notation as class diagram .They are there to show similar instance of a class at a particular point in time. One use object diagram in order to show real life example. It is use to clarify classes and inheritance .They assist non-programming stakeholders who may find class diagrams too abstract. They are extremely beneficial when one want to capture snapshots of particular situations during program execution in order to see the relationships of a set of object attributes Tool: There are many tools available in the market where you can easily make, edit, modify and manage ODs easily. Tool we found for your convenience is POSEIDON. This can be found at http://www.developer.com/design/article.php/10925_2223551_2 It summarizes the way to operate the tool along with special instructions and snapshots.

Notations/Symbols include: Object names, represented as a rectangle, contain the name of the object and its class Object attributes can be listed in a separate compartment and must have values assigned to them.

Active object controls action flow. These objects are illustrated with a thicker border.

Multiplicity is to illustrate multiple objects as one symbol (rectangles over each other) if the attributes of the individual objects are not important. Links (lines) are instances of associations. Self-linked (line curving to the same object) Objects can fulfill more than one role.

Examples: The object diagram of Figure 1 explores the concepts that a student can attend a seminar, be wait listed for a seminar, or can be a teaching assistant within a seminar. The diagram explores an example where John Smith and Sally Jones are both students in CSC 100a whereas Sarah McGrath is the teaching assistant for it. Sarah is also the teaching assistant in CSC 100b, Scott Ambler is an enrolled student, and Ed Maloney is wait listed. The diagram also shows that the two seminars are both sections of the Introduction to Computer Science course. This diagram makes the three relationships between students and seminars, as well as the relationship between seminars and courses, much more explicit

2: This example highlights that instances of an object can point to other instances of an object. In fact, a path of such object references can lead back to itself to form a cycle. For example, the Georgia Dome Person object indirectly points to the Half Dome Person object through the children instance variable, while the Half Dome Person object directly points to the Georgia Dome Person object via the mom instance variable. Such cycles are essential for modelling mutual dependencies among objects and are common in real programs.

SOURCES: Example 1: Source http://www.agilemodeling.com/artifacts/objectDiagram.htm Example 2: http://images.google.com.pk/imgres?imgurl=http://cs.wellesley.edu/~cs111/fall97/lectures/ObjectDiagrams/object-diagrams11.gif&imgrefurl=http://cs.wellesley.edu/~cs111/fall97/lectures/ObjectDiagrams/object-diagrams.html&usg=__r2pkiO0_QkLBX43y1IY9TxJD4Vg=&h=311&w=437&sz=4&hl=en&start=2&um=1&tbnid=W36ArjSUvVZTEM:&tbnh=90&tbnw=126&prev=/images%3Fq%3DOBJECT%2BDIAGRAMS%26um%3D1%26hl%3Den%26sa%3DX Text: http://www.altova.com/features_object_diagram.html http://www.developer.com/design/article.php/2223551 www.uni-koblenz.de/~beckert/Lehre/Spezifikation/07UMLObjectDiagrams.pdf https://prof.hti.bfh.ch/fileadmin/home/due1/uml_dp/udp_od_200802.pdf