[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-694796-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-694796-en":130,"doc-similar-694796":159},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","uml-modules-vs-classes","UML - Modules vs. Classes","","Lecture notes for CMPT166 covering Unified Modeling Language (UML) as a practical tool for designing programs. The material introduces main UML diagram types (static and dynamic) and explains key diagram elements such as class diagrams and use case relationships between actors. It also summarizes design patterns using the Gang of Four reference and contrasts modules (M2) with object-oriented classes, focusing on interfaces, data hiding, singleton versus per-instance data, typing, derivation, and inheritance.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/uml-modules-vs-classes/694796/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/uml-modules-vs-classes/694796.png","ImageObject",300,407,{"name":42,"@type":43},"Anna Hans","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-12-01","2026-11-10",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What are the main UML diagram types covered in these notes?","Question",{"text":63,"@type":64},"The notes distinguish static diagrams (class, object, package) from dynamic diagrams (use case, sequence diagram, state chart).","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the class diagram represent classes and relationships?",{"text":68,"@type":64},"Each box represents a class and includes its name, attributes, and methods, while lines between boxes indicate relationships between classes.",{"name":70,"@type":61,"acceptedAnswer":71},"What are the key differences between modules (M2) and OO classes?",{"text":72,"@type":64},"Modules are treated as singletons for data items, are not types, and cannot be derived from other modules; OO classes have per-instance data, are types, and support inheritance from other classes.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},694796,1794347817,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":110,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":80,"read_time":117,"preview_page_count":33,"preview_urls":143},5909892332657,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","UML diagrams and Modules vs. Classes  \n14 Jan 2009 CMPT166 Dr . Sean Ho  \nTrinity Western University  \nUML: Unified Modeling Language  \n􀀁 Diagrams for use in designing your programs  \n􀀁 Main diagram types:  \n● Static: Class diagram, object, package  \n● Dynamic: Use case diagram, sequence diagram, state chart  \n􀀁 Handy for diagramming by hand, or  \n􀀁 UML software tools, e.g. , Visio, Sun JSEnterprise  \n􀀁 Developed by Booch, Rumbaugh, and Jacobson, of OMG (Object Management Group)  \n􀀁 Current version is 2.0 : [www. uml.org](www. uml.org)  \nCMPT166: UML 14Jan 2009  \n2  \nUML: Class diagram  \n􀀁 Each box represents a class (type)  \n● Name, attributes, methods  \n􀀁 Lines show relationships between classes  \nCMPT166: UML 14Jan 2009 3  \nUML: Use case diagram  \n􀀁 Describes relationships between actors:  \n􀀃 Patient calls the clinic to make an appointment  \n􀀃 Receptionist books timeslot  \n􀀃 Patient sees doctor and requests medication  \n􀀃 Patient pays bill to clerk  \n􀀁 See Borland's UML tutorial for more details  \nCMPT166: UML 14Jan 2009 4  \nDesign patterns  \n􀀁 Commonly used software designs  \n􀀁 Not reinventing the wheel  \n● Similar to libraries, but for program design  \n􀀁 Similar to architectural elements: arch, column  \n􀀁 “Gang of Four” standard reference (1995):  \n● Gamma, Helm, Johnson, Vlissides,“Design Patterns: Elements of Reusable OO Software”  \n● Creational patterns: e.g. , abstract factory  \n● Structural patterns: e.g. , proxy  \n● Behavioural patterns: e.g. , observer, MVC  \nCMPT166: UML 14Jan 2009 5  \nModules vs. Classes  \n􀀁 Both modules (M2) and classes (OO):  \n● Have both a public interface (DEF) anda private implementation (IMP)  \n● Allow data hiding (in the private portion)  \n􀀁 But there are differences:  \n● Data items in modules are singletons ;  \n􀀃 Each instance of a class has its own data items  \n● Modules in M2 are not types ; OO classes are  \n● Modules cannot be derived from other modules  \n􀀃 Classes can inherit (subclass) from other classes  \nCMPT166: UML 14Jan 2009 6  \nDeclaring classes: OO-M2  \n􀀁 Declaring a class in object-oriented M2:  \nCLASS Rectangle;  \nCONST  \nsides = 4;  \nVAR  \nlength, width: INTEGER;  \nPROCEDURE SetDims (l, w: INTEGER);  \nBEGIN  \nlength := l;  \nwidth := w;  \nEND SetDims;  \nBEGIN  \nSetDims (0, 0);  \nEND Rectangle;  \nCMPT166: UML 14Jan 2009 7  \nDeclaring classes: C++  \n􀀁 Header (public definition) file:  \nclass Rectangle {  \nconst int sides = 4;  \nint length, width;  \nvoid SetDims (int l, int w);}  \n􀀁 Code (private implementation) file:  \nvoid Rectangle::SetDims (int l, int w) { length = l;  \nwidth = w;  \n}  \nCMPT166: UML 14Jan 2009 8","cbCaijIPXFYRLs9r","https://ap.wps.com/l/cbCaijIPXFYRLs9r","pdf",112065,"English","# UML Overview\n## Main Diagram Types (Static vs Dynamic)\n## Class Diagram\n## Use Case Diagram\n# Design Patterns\n# Modules vs. Classes\n## Interfaces and Data Hiding\n## Singleton Data vs Per-Instance Data\n## Types and Derivation\n# Declaring Classes (OO-M2 and C++)","[{\"question\":\"What are the main UML diagram types covered in these notes?\",\"answer\":\"The notes distinguish static diagrams (class, object, package) from dynamic diagrams (use case, sequence diagram, state chart).\"},{\"question\":\"How does the class diagram represent classes and relationships?\",\"answer\":\"Each box represents a class and includes its name, attributes, and methods, while lines between boxes indicate relationships between classes.\"},{\"question\":\"What are the key differences between modules (M2) and OO classes?\",\"answer\":\"Modules are treated as singletons for data items, are not types, and cannot be derived from other modules; OO classes have per-instance data, are types, and support inheritance from other classes.\"}]","UML - Modules vs. Classes | PDF",[144,148,152,155],{"page_no":22,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/02a602721702b37f0653a380ff8cd0ee.webp",983,736,{"page_no":26,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/52021fe67a6486b5551e2ec85d6f6217.webp",982,735,{"page_no":30,"url":153,"width":154,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5c5dcce0912cda4661c0f910998f4fc7.webp",981,{"page_no":33,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3f2e684395a01c36b21e99cd643906ca.webp",980,734,{"list":160,"token":11},[161,167,174,180,187,194,200,206,212,218],{"doc_id":162,"doc_title":163,"file_type":137,"home_preview_img_url":164,"slug":165,"view_count":110,"category_name":29,"create_tm":166},655925,"UML Diagram Key - Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294431/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=KL%2BiF4vNz4U6RSULt0wlqLtRnTw%3D","uml-diagram-key-basics",1792964949,{"doc_id":168,"doc_title":169,"file_type":137,"home_preview_img_url":170,"slug":171,"view_count":172,"category_name":29,"create_tm":173},655638,"UML - Unified Modeling Language - Overview of Diagram Types and Class Diagram Notations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286461/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=HKSEzg4f1Q%2FGlukoh%2FSsHaClC%2Bo%3D","uml-unified-modeling-language-overview-of-diagram-types-and-class-diagram-notations",17,1792962971,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":115,"category_name":29,"create_tm":179},655765,"UML basics: The class diagram - Part 1 - An introduction to the Unified Modeling Language","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974776656/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=2%2BBdZDD78IeQ7WDlPxVYV28cBOw%3D","uml-basics-the-class-diagram-part-1-an-introduction-to-the-unified-modeling-language",1792963653,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":185,"category_name":29,"create_tm":186},655924,"UML Tutorial - UML 2.0 - Activity Diagram Elements","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294428/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=6b5EsSGDiOaSV7EGxyzm9ptVNk0%3D","uml-tutorial-uml-20-activity-diagram-elements",11,1792964948,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":192,"category_name":29,"create_tm":193},655784,"Unified Modeling Language (UML) Enterprise Architect - User Guide Series - Table of Contents","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975289647/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=GVHXfZOhhFMKbfik3A1pnh72NCo%3D","unified-modeling-language-uml-enterprise-architect-user-guide-series-table-of-contents",12,1792963746,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":115,"category_name":29,"create_tm":199},655788,"Practical UML - A Hands-On Introduction for Developers - Tutorial","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974777074/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=0PrTeJ13Tj4gsdeeT0MDPZz0GBE%3D","practical-uml-a-hands-on-introduction-for-developers-tutorial",1792963781,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":123,"category_name":29,"create_tm":205},655886,"Umbrello UML Modeller Handbook","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975292897/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=aaJO1vA6E78u02WarxR5%2F%2FBv4JA%3D","umbrello-uml-modeller-handbook",1792964560,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":123,"category_name":29,"create_tm":211},655609,"Introduction to UML - Use Case Diagram - Types and Notations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286118/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=ZwHCyCgetiwo%2BkHEWKQeVCzF6mc%3D","introduction-to-uml-use-case-diagram-types-and-notations",1792962867,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":185,"category_name":29,"create_tm":217},655627,"UML - Class Diagram - How to Draw and Where to Use","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286220/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=fAcsxQlYDRjvA4CwZNc0q1S3N%2Bs%3D","uml-class-diagram-how-to-draw-and-where-to-use",1792962911,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":115,"category_name":29,"create_tm":223},655634,"UMLclassdiagrams - Class diagram","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286409/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111219&Signature=UqqTm52qXUs1en1sFE6AEeDjMf4%3D","umlclassdiagrams-class-diagram",1792962958]