what is uml diagram and its part object diagram explained
Size: 678.45 KB
Language: en
Added: Mar 26, 2022
Slides: 13 pages
Slide Content
GCUF Presented By M. Bilal Aslam 753203 Abdullah 753223 Zunaira Azeem 753227 Nafeesa Shahid 2753217 Presented To Mam Fiza Tariq Class BS.IT 5 th (M) Topic Object Diagram
What is Object Diagram ? An object diagram is a UML structural diagram that shows the instances of the classifiers in models . Object diagrams use notation that is similar to that used in class diagrams. Object diagrams show specific instances of those classifiers and the links between those instances at a point in time . O bject diagram shows a snapshot of the detailed state of a system at a point in time, thus an object diagram encompasses objects and their relationships which may be considered a special case of a class diagram or a communication diagram.
How to Draw Object Diagram Before drawing an object diagram, one should analyze all the objects inside the system. The relations of the object must be known before creating the diagram . Association between various objects must be cleared before . An object should have a meaningful name that describes its functionality . An object must be explored to analyze various functionalities of it.
Purpose of Object Diagram The use of object diagrams is fairly limited, mainly to show examples of data structures. During the analysis phase of a project, you might create a class diagram to describe the structure of a system and then create a set of object diagrams as test cases to verify the accuracy and completeness of the class diagram. Before you create a class diagram, you might create an object diagram to discover facts about specific model elements and their links, or to illustrate specific examples of the classifiers that are required.
Basic Object Diagram Symbols and Notations Object Names : Every object is actually symbolized like a rectangle, that offers the name from the object and its class underlined as well as divided with a colon . Object Attributes : Similar to classes, you are able to list object attributes inside a separate compartment. However, unlike classes, object attributes should have values assigned for them . Links: Links tend to be instances associated with associations. You can draw a link while using the lines utilized in class diagrams.
Order management system The following diagram is an instance of the system at a particular time of purchase. It has the following objects . Customer, Order, Special Order, Normal Order. Now the customer object (C) is associated with three order objects (O1, O2, and O3). These order objects are associated with special order and normal order objects (S1, S2, and N1). The customer has the following three orders with different numbers (12, 32 and 40) for the particular time considered.
Order management system The customer can increase the number of orders in future and in that scenario the object diagram will reflect that. If order, special order, and normal order objects are observed then you will find that they have some values . For orders, the values are 12, 32, and 40 which implies that the objects have these values for a particular moment (here the particular time when the purchase is made is considered as the moment) when the instance is captured The same is true for special order and normal order objects which have number of orders as 20, 30, and 60. If a different time of purchase is considered, then these values will change accordingly.
POS
Where to Use Object Diagrams? Object diagrams can be imagined as the snapshot of a running system at a particular moment. Let us consider an example of a running train Now, if you take a snap of the running train then you will find a static picture of it having the following − A particular state which is running. A particular number of passengers. which will change if the snap is taken in a different time.
Where to Use Object Diagrams? Here, we can imagine the snap of the running train is an object having the above values. And this is true for any real-life simple or complex system. In a nutshell, it can be said that object diagrams are used for: Making the prototype of a system. Reverse engineering. Modeling complex data structures. Understanding the system from practical perspective.