[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-655770-105":59,"doc-detail-655770-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","chapter-6-uml-class-and-object-diagrams","Chapter 6 - UML Class and Object Diagrams","","Lecture notes introducing how UML models interactions among classes in object-oriented programming, focusing on inheritance generalisation and concrete object diagrams. It contrasts delegation-style relationships (associations, dependencies) with generalisation, explaining is-a semantics, visibility of operations, abstract classes, and constraints on instantiation. It then explains object diagrams as static views derived from class diagrams, including modelling objects, distinguishing diagram naming and scope, and representing associations, dependencies, and multiplicities through examples.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/chapter-6-uml-class-and-object-diagrams/655770/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/chapter-6-uml-class-and-object-diagrams/655770.png","ImageObject",300,407,{"name":92,"@type":93},"8796093062539","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-30","2026-10-25",true,{"@type":102,"interactionType":103,"userInteractionCount":29},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What problem does UML address for classes in object-oriented programming?","Question",{"text":112,"@type":113},"Classes interact rather than operate in isolation, so UML is used to model how classes interact, especially through structural diagrams like class and object diagrams. Interactions are represented as relationships such as delegation and inheritance.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does UML model inheritance using generalisation?",{"text":117,"@type":113},"Generalisation relationships model inheritance and are based on an is-a relationship between the derived and base classes. The notes explain how operations in an abstract class affect what can be called from instances of a subclass.",{"name":119,"@type":110,"acceptedAnswer":120},"How are object diagrams different from class diagrams in UML?",{"text":121,"@type":113},"Object diagrams show specific instances of classes at a moment in time and provide a static view, while class diagrams describe fixed class structures. Object diagrams derive relationships from class diagrams and represent objects with multiplicities, but do not feature operations.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},655770,1793147912,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":66,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":133,"file_id":134,"file_url":135,"file_type":136,"file_size":137,"view_count":29,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":39,"language":138,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":139,"faqs":140,"seo_title":141,"seo_description":67,"update_tm":142,"read_time":46},8796093062539,"Department of Computer Science  \nTackling Design Patterns  \nChapter 6: UML Class and Object Diagrams  \nCopyright 􀀍c 2016 by Linda Marshall and Vreda Pieterse. All rights reserved.  \nContents  \n6.1 Introduction ................................. 2  \n6.2 Modelling generalisation ......................... 2  \n6.3 Object diagrams ............................... 3  \n6.3.1 Modelling objects .............................. 3  \n6.3.2 Modelling relationships ........................... 4  \n6.3.3 Example ................................... 6  \n6.3.4 Object diagrams when modelling behaviour ................ 8  \nReferences ....................................... 8  \n6.1 Introduction  \nIn object-oriented programming, classes do not function in isolation, they interact with each other. UML therefore needs to be able to model how classes interact and for structural UML diagrams, such as class and object diagrams, these interactions are modelled as relationships. Two broad categories of relationships exist, those which are used to model delegation and those used to model inheritance. Examples of delegation relationships are associations and dependencies, which have already been discussed. To model inheritance, the generalisation relationship has been de􀀌ned in UML. Figure 1 provides an overview of the di􀀋erent relationships which can be modelled in UML [1] .  \nFigure 1: UML relationships  \nModelling classes and delegation in UML was discussed in Chapter 2, speci􀀌cally Sections 2.2.1 and 2.2.2 respectively. In this lecture note, modelling inheritance and objects will be the focus.  \n6.2 Modelling generalisation  \nPublic inheritance has been used in Chapters 3, 4 and 5 in the code examples and presented in the corresponding UML Class diagrams for the examples. In Section 3 .2. 1 of Chapter  \n3, public inheritance was presented as an is-a relationship. A di􀀋erentiation was also made between di􀀋erent types of operations in a class, namely: non-virtual, virtual and pure virtual. In Figure 2, ConcreteClass is-a AbstractClass. ConcreteClass inherits from AbstractClass and therefore there is a generalisation relationship between the two classes.  \nFigure 2: Modelling generalisation in UML  \nAll operations in AbstractClass are public, this means that they can be called when an instance of ConcreteClass. nonvirtualOperation, as de􀀌ned in AbstractClass, can be called by an object of ConcreteClass. The operation virtualOperation maybe rede􀀌ned in ConcreteClass, while purevirtualOperation must be implemented in ClassOperation. A class with a pure virtual operation cannot be instantiated and is therefore de􀀌ned as abstract. Under the assumption that the non-virtual operation was not public, but protected or private, then a program or object calling operations of ClassOperation would not be access the operation. A operation within ConcreteClass would be able to call the operation if it were de􀀌ned as protected.  \n6.3 Object diagrams  \nObject diagrams are derived from class diagrams and are therefore dependent on class diagrams. They represent an instance of a class or classes and are therefore seen as a static view of the class at a speci􀀌c moment. Object diagrams are concrete in nature, they represent the real-word versus class diagrams which are abstract representations and are seen as a blue-print. An object diagram represents unlimited instances while class diagrams comprise of 􀀌xed classes. Object diagrams use the same basic relationships as class diagrams. Object diagrams can be used for forward and reverse engineering of code.  \n6.3.1 Modelling objects  \nRefer back to Figure 1 in Chapter 1 showing that both class and object diagrams are classi􀀌ed as UML structural diagrams depicting the relationships between classes and objects respectively.  \nAn example of a diagram showing di􀀋erent styles a single object can be depicted in UMLas given in Figure 3 . Note the class which these objects are instances of, given in Figure 4, consists of an attribute with o","cbCaioyAwkuQ665E","https://ap.wps.com/l/cbCaioyAwkuQ665E","pdf",532623,"English","# 6.1 Introduction\n# 6.2 Modelling generalisation\n# 6.3 Object diagrams\n## 6.3.1 Modelling objects\n## 6.3.2 Modelling relationships","[{\"question\":\"What problem does UML address for classes in object-oriented programming?\",\"answer\":\"Classes interact rather than operate in isolation, so UML is used to model how classes interact, especially through structural diagrams like class and object diagrams. Interactions are represented as relationships such as delegation and inheritance.\"},{\"question\":\"How does UML model inheritance using generalisation?\",\"answer\":\"Generalisation relationships model inheritance and are based on an is-a relationship between the derived and base classes. The notes explain how operations in an abstract class affect what can be called from instances of a subclass.\"},{\"question\":\"How are object diagrams different from class diagrams in UML?\",\"answer\":\"Object diagrams show specific instances of classes at a moment in time and provide a static view, while class diagrams describe fixed class structures. Object diagrams derive relationships from class diagrams and represent objects with multiplicities, but do not feature operations.\"}]","Chapter 6 - UML Class and Object Diagrams | PDF",1792963661]