[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-655582-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-655582-en":130,"doc-similar-655582":162},{"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","the-uml-class-diagram-class-diagram-basics-2","The UML Class Diagram - Class Diagram Basics - 2","","The UML class diagram explains how to model a system’s static structure using core elements such as classes, attributes, operations (methods), associations, aggregations, compositions, and generalisations. It outlines key properties of class diagrams and provides a practical approach for determining classes from requirements, including analyses of nouns, verbs, adjectives, and adverbs. The document also covers class attributes, including types, visibility, default values, enumeration, syntax, and examples, and then extends to operations with Java-oriented representations and basic constraints.",{"@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/the-uml-class-diagram-class-diagram-basics-2/655582/",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/the-uml-class-diagram-class-diagram-basics-2/655582.png","ImageObject",300,407,{"name":42,"@type":43},"bocahgabuttt","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-10-25",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 is the purpose of a UML class diagram?","Question",{"text":63,"@type":64},"A UML class diagram is a static diagram that describes system structure by combining model elements such as classes, attributes, operations, and relationships.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How can classes be determined during textual analysis?",{"text":68,"@type":64},"Use linguistic cues: common/improper nouns suggest classes, proper nouns or direct references suggest objects (instances), adjectives suggest attributes, and “doing” verbs suggest operations.",{"name":70,"@type":61,"acceptedAnswer":71},"What does UML class attribute syntax describe?",{"text":72,"@type":64},"It specifies visibility, name, type, initial value, and optional properties, following the format: Visibility name:type=init_value{property_string}.","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},655582,1793051341,{"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":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145,"preview_page_count":33,"preview_urls":146},962094248839,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","The UML Class Diagram  \n• Is a static diagram (describes system structure)  \n– Combines a number of model elements:  \n• Classes  \n• Attributes  \n• Operations (methods)  \n• Associations  \n• Aggregations  \n• Compositions  \n• Generalisations  \nA UML Class  \n\n| Name |\n| --- |\n| Attributes |\n| Operations |\n\nProperties of class diagrams:  \n-Static model;  \n-Models structure and behaviour;  \n-Used as a basis for other diagrams;  \n-Easily converted to an object diagram.  \nDetermining Classes (1/2)  \n● Is there data that requires storage, transformation or analysis?  \n● Are there external systems interacting with the one in question?  \n● Are any class libraries or components being use (from manufacturers, other colleagues or past projects)?  \n● Does the system handle any devices?  \n● Does the system model organisational structures?  \n● Analyse all actor roles.  \nDetermining Classes (2/2)  \n• Textual Analysis (based on Dennis, 2002)  \n• A common or improper noun implies a class  \n• A proper noun or direct reference implies an object (instance of a class)  \n• A collective noun implies a class made up of groups of objects from another class  \n• An adjective implies an attribute  \n• A “doing” verb implies an operation  \n• A “being” verb implies a classification relationship between an object and its class  \n• A “having” verb implies an aggregation or association relationship  \n• A transitive verb implies an operation  \n• An intransitive verb implies an exception  \n• A predicate or descriptive verb phrase implies an operation  \n• An adverb implies an attribute of a relationship or an operation  \nUML Class Attributes (1/2)  \n􀁺 Very system dependent  \n􀁺 Describe characteristics of objects belonging to that class  \n􀁺 Can be informative-or confusing  \n􀁺 Has a definite type  \n– Primitive (Boolean, integer, real, enumerated, etc.)  \n– language specific  \n– other classes  \n– any user defined type  \n􀁺 Has different visibility, including:  \n– public (viewed and used from other classes)  \n– private (cannot be accessed from other classes)  \nUML Class Attributes (2/2)  \n• Can be given a default value  \n• Can be given class-scope  \n• Can list possible values of enumeration  \n• Directly implementable into most modern programming languages with object-oriented support (e.g. Java)  \nAttribute syntax:  \nVisibility name:type=init_value{property_string}  \nUML Class Attribute Examples  \n\n| UNIXaccount |\n| --- |\n| + username : string + groupname : string + filesystem_size : integer + creation_date : date\u003Cbr>-password : string |\n\n\n| UNIXaccount |\n| --- |\n| + username : string + groupname : string = “staff\"+ filesystem_size : integer + creation_date : date\u003Cbr>-password : string |\n\nInvoice  \n_ _ integer  \n+ amount : real  \n+ date : date = current date + customer : string + specification : string  \n-administrator : string = \"unspecified\"  \n-number of invoices :  \nInvoice  \n+ amount : real  \n+ date : date = current date + customer : string + specification : string  \n-administrator : string = \"unspecified\"  \n-number of invoices : integer  \n+ status : status = unpaid { unpaid, paid }  \nUML Class-to-Java Example  \nPublic class UNIXaccount {  \npublic string username;  \npublic string groupname = \"csai\";  \npublic int filesystem_size;  \npublic date creation_date;  \nprivate string password;  \nstatic private integer no_of_accounts = 0 public UNIXaccount()  \n{  \n//Other initialisation no_of_accounts++;  \n}  \n//Methods go here };  \n\n| UNIXaccount |\n| --- |\n| + username : string + groupname : string = “staff\"+ filesystem_size : integer\u003Cbr>+ creation_date : date\u003Cbr>-password : string\u003Cbr>-no of accounts : integer = 0 |\n\nOperations (Methods)  \nPublic class Figure {  \nprivate int x = 0;  \nprivate int y = 0; public void draw(){  \n\n| Figure |\n| --- |\n| -x : integer = 0\u003Cbr>-y : integer = 0 |\n| + draw() |\n\n//Java code for drawing figure}  \n};  \nFigure fig1 = new Figure();  \nFigure fig2 = new Figure(); fig1.draw();  \nfig2.draw();  \nConstraints on Operations  \n\n| BurglarAlarm |\n| --- |\n|","cbCaid0dg5VC90zb","https://ap.wps.com/l/cbCaid0dg5VC90zb","pdf",578708,36,"English","# The UML Class Diagram\n## Core elements and properties\n## Determining classes (1/2)\n## Determining classes (2/2)\n## UML Class Attributes (1/2)\n## UML Class Attributes (2/2)\n## Attribute syntax and examples\n## UML Class-to-Java example\n## Operations (Methods)\n## Constraints on Operations","[{\"question\":\"What is the purpose of a UML class diagram?\",\"answer\":\"A UML class diagram is a static diagram that describes system structure by combining model elements such as classes, attributes, operations, and relationships.\"},{\"question\":\"How can classes be determined during textual analysis?\",\"answer\":\"Use linguistic cues: common/improper nouns suggest classes, proper nouns or direct references suggest objects (instances), adjectives suggest attributes, and “doing” verbs suggest operations.\"},{\"question\":\"What does UML class attribute syntax describe?\",\"answer\":\"It specifies visibility, name, type, initial value, and optional properties, following the format: Visibility name:type=init_value{property_string}.\"}]","The UML Class Diagram - Class Diagram Basics - 2 | PDF",1792962726,91,[147,151,154,158],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/9346fbfd36c7ba3aa149279d4eb11c17.webp",983,736,{"page_no":26,"url":152,"width":153,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/8e0abba1bacda27e6131625cbe291ae2.webp",982,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/b70160ca155ed514a5550963fe6d1f5b.webp",981,735,{"page_no":33,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/044a697cf3c13239b5b000f9ff0c0918.webp",980,734,{"list":163,"token":11},[164,170,176,182,188,194,201,207,213,219],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":115,"category_name":29,"create_tm":169},655768,"UML Notation Guide - Chapter 4 - Static Structure Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975289083/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=kNLe2grDCBDXgE3tV5PAiCzDzuI%3D","uml-notation-guide-chapter-4-static-structure-diagrams",1792963660,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":115,"category_name":29,"create_tm":175},655771,"UML - Unified Modeling Language - Design and UML Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975289134/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=fUw%2BN9luUuAycDNYEKyt5Cja7UQ%3D","uml-unified-modeling-language-design-and-uml-diagrams",1792963662,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":102,"category_name":29,"create_tm":181},655772,"Class Diagram Relationships in UML with Examples - Learn How to Build Correct UML Class Diagram Relationships","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975289195/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=5Ss6FyKt8x11BR1dzHTQ%2F8uKSIE%3D","class-diagram-relationships-in-uml-with-examples-learn-how-to-build-correct-uml-class-diagram-relationships",1792963669,{"doc_id":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":110,"category_name":29,"create_tm":187},655575,"UML Tutorial - Part 1 - Class Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285546/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=yhCXdS0PVI4DPxfGjvCTmhVCUcY%3D","uml-tutorial-part-1-class-diagrams",1792962707,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":102,"category_name":29,"create_tm":193},655757,"Library Management System - Java OOP Case Study","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974776558/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=1HDJdcrJVQD0hvD1kCcyBCFclEA%3D","library-management-system-java-oop-case-study",1792963616,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":29,"create_tm":200},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=1796110799&Signature=z0G4HvVfAkLYfBZzPCcJcNGuzlg%3D","uml-class-diagram-how-to-draw-and-where-to-use",11,1792962911,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":110,"category_name":29,"create_tm":206},655555,"A Primer on UML Class Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285213/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=1eXZsComldcanTaUQGcs0SJvvCc%3D","a-primer-on-uml-class-diagrams",1792962619,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":115,"category_name":29,"create_tm":212},655604,"UML-ATM - Class Diagram, Use Case, Sequence, Communication, State, Activity","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974775471/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=OCjhcj4bA%2BBKh0qnRPM5ohCeChE%3D","uml-atm-class-diagram-use-case-sequence-communication-state-activity",1792962853,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":102,"category_name":29,"create_tm":218},670910,"Fourth AP Edition - Object-Oriented Programming and Data Structures - Preface xiii","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988353200/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=CWRpi%2FUQ2LpgTSvyAEtwqsYvd1k%3D","fourth-ap-edition-object-oriented-programming-and-data-structures-preface-xiii",1793572671,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":115,"category_name":29,"create_tm":224},655639,"Software Development with UML - Classes & Instances","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286506/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=gl4f7cgkN8cu8mzEhGOevFxEU10%3D","software-development-with-uml-classes-instances",1792962983]