{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/old/02-theory/design_class_diagram",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnéuniversitetet","language":"sv","courseCode":"1DV607"}},"mdx":{"fields":{"id":"82fb2469-5818-5d3a-b761-f60856ee61cd","title":"UML Design Class Notation","slug":"/old/02-theory/design_class_diagram"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"UML Design Class Notation\",\n  \"metaTitle\": \"UML Notation for Classes with Java Examples\",\n  \"metaDescription\": \"List of important chapters in the book\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Youtube = makeShortcode(\"Youtube\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"Basic Class, Interface, and Abstract class\"), mdx(\"p\", null, \"In Java operations are called \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"methods\"), \", and attributes called \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"fields\")), mdx(\"p\", null, \"Interfaces typically only have public operation definitions. In later versions of Java you can have both fields and \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"default methods\"), \" in interfaces. This is quite special for Java and not part of basic object orientation.\"), mdx(\"h3\", null, \"Design Class Diagram Notation Crash Course\"), mdx(Youtube, {\n    link: \"https://www.youtube.com/embed/padlnp0QheI\",\n    mdxType: \"Youtube\"\n  }), mdx(\"h3\", null, \"UML\"), mdx(\"p\", null, \"Alternate notations for \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"abstract classes\"), \" is to have the class name in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"italics\"), \". This is, however, hard to see and esp. hard to write when doing sketches by hand, prefer to use the notation below.\"), mdx(\"p\", null, \"Alternate notation for \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"interfaces\"), \" is the lollipop (aka. balls and socket) notation, you typically find these in component diagrams and sequence diagrams (when sending a message availabe through an interface).\"), mdx(\"p\", null, \"Note the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"underline\"), \" on \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"static operations\"), \" and \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"static attributes\"), \" (static attribute not shown in diagram).\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1035px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/cf8e5/uml_design_classes.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"34.36293436293437%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAIAAACHqfpvAAAACXBIWXMAABYlAAAWJQFJUiTwAAABFElEQVQY01XPbc+CIBiGYf//P2uJCmoNh2i+TAS0tmqJgnd7dLWe4/u1a6fXNE1VVXVdV1UVx3GWZUopKWXf98MwAIC1dvmY53n54RFCfN8/Ho8YY9/3McZa63Ech2G4Xq8AcLvdlFLjOHZdhzGmlOqNUupvfDgc0IYQghAKgiAMQ0KIUgoAhBCMsaIo8jxnjGVZVpZlsfEopYSQNE2TJKGUphtK6el00loDgPuxrqv94Tnn9gBrrTFmmqZv5DzPALAsizHm8Xg8n09jjHMOPrz7/d62rRDicrlEUYQQ4pwLIdq23Z+llEmSIITO57OU8vV6/RvneV6WJed8L2GM1XXNOd+bm6aJ47jrOq21lHKapu/4DQBKfudaLadmAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"UML Design Classes\",\n    \"title\": \"UML Design Classes\",\n    \"src\": \"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/e3189/uml_design_classes.png\",\n    \"srcSet\": [\"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/a2ead/uml_design_classes.png 259w\", \"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/6b9fd/uml_design_classes.png 518w\", \"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/e3189/uml_design_classes.png 1035w\", \"/courses/object-oriented-analysis-and-design/static/289bc6abfa58626a35444ab46bfd091b/cf8e5/uml_design_classes.png 1402w\"],\n    \"sizes\": \"(max-width: 1035px) 100vw, 1035px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h3\", null, \"Java Implementation\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-java\"\n  }, \"class ClassName {\\n    public AttributeType publicAttributeName;\\n    protected AttributeType protectedAttributeName;\\n    private AttributeType privateAttributeName;\\n\\n    public ReturnType publicOperation(ArgumentType argument) {\\n      ReturnType ret = new ReturnType();\\n      return ret;  \\n    }\\n\\n    private ReturnType protectedOperation(ArgumentType argument) {\\n      ReturnType ret = new ReturnType();\\n      return ret;  \\n    }\\n\\n    protected ReturnType protectedOperation(ArgumentType argument) {\\n      ReturnType ret = new ReturnType();\\n      return ret;  \\n    }\\n\\n    public static ReturnType publicOperation(ArgumentType argument) {\\n      ReturnType ret = new ReturnType();\\n      return ret;  \\n    }\\n}\\n\\ninterface InterfaceName {\\n    \\n    ReturnType publicOperation(ArgumentType argument);\\n}\\n\\nabstract class AbstractClassName {\\n    \\n    public abstract ReturnType publicOperation(ArgumentType argument);\\n}\\n\\nenum AnEnumeration {\\n  EnumValue1,\\n  EnumValue2;\\n}\\n\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#basic-class-interface-and-abstract-class","title":"Basic Class, Interface, and Abstract class","items":[{"url":"#design-class-diagram-notation-crash-course","title":"Design Class Diagram Notation Crash Course"},{"url":"#uml","title":"UML"},{"url":"#java-implementation","title":"Java Implementation"}]}]},"parent":{"relativePath":"old/02-theory/design_class_diagram.md"},"frontmatter":{"metaTitle":"UML Notation for Classes with Java Examples","metaDescription":"List of important chapters in the book","fullWidth":null}},"allMdx":{"edges":[{"node":{"fields":{"slug":"/forelasningar-2026","title":"Föreläsningar 2026"}}},{"node":{"fields":{"slug":"/","title":"Objektorienterad analys och design med UML (1DV607)"}}},{"node":{"fields":{"slug":"/laborationer-2026","title":"Laborationer 2026"}}},{"node":{"fields":{"slug":"/old","title":"Old"}}},{"node":{"fields":{"slug":"/forelasningar-2026/00-tema-2-objektorienterad-analys-och-uml","title":"Tema 2 – Objektorienterad analys och modellering med UML"}}},{"node":{"fields":{"slug":"/forelasningar-2026/00-tema-3-objektorienterad-design-med-uml","title":"Tema 3 – Objektorienterad design med UML"}}},{"node":{"fields":{"slug":"/forelasningar-2026/01-kursintroduktion-och-domanmodellering","title":"1. Kursintroduktion och domänmodellering"}}},{"node":{"fields":{"slug":"/forelasningar-2026/02-objektorienterad-analys-och-modellering","title":"2. Objektorienterad analys och modellering"}}},{"node":{"fields":{"slug":"/forelasningar-2026/03-uml-modellering","title":"3. Fortsatt modellering med UML"}}},{"node":{"fields":{"slug":"/forelasningar-2026/04-grasp","title":"4. GRASP"}}},{"node":{"fields":{"slug":"/forelasningar-2026/00-tema-1-grunderna","title":"Tema 1 – Grunderna i objektorienterad analys och design"}}},{"node":{"fields":{"slug":"/laborationer-2026/01-laboration-1","title":"Laboration 1 – Domänmodellering"}}},{"node":{"fields":{"slug":"/old/001-introduction","title":"Course Introduction"}}},{"node":{"fields":{"slug":"/old/01-information","title":"Course Information"}}},{"node":{"fields":{"slug":"/laborationer-2026/02-laboration-2","title":"Laboration 2"}}},{"node":{"fields":{"slug":"/old/02-theory","title":"Theory"}}},{"node":{"fields":{"slug":"/old/03-assignments","title":"Assignments"}}},{"node":{"fields":{"slug":"/old/01-information/01-welcome","title":"Welcome to the Course"}}},{"node":{"fields":{"slug":"/old/01-information/registration","title":"Course Registration"}}},{"node":{"fields":{"slug":"/old/02-theory/01-intro_to_ooad","title":"Introduction to Object Oriented Analysis and Design"}}},{"node":{"fields":{"slug":"/old/01-information/grading","title":"Course Grading"}}},{"node":{"fields":{"slug":"/old/02-theory/03_software_architecture","title":"Software Architecture"}}},{"node":{"fields":{"slug":"/old/02-theory/04_mvc","title":"Model View Controller"}}},{"node":{"fields":{"slug":"/old/02-theory/02-domain_modeling","title":"Domain Modeling"}}},{"node":{"fields":{"slug":"/old/02-theory/06_grasp1","title":"GRASP 1"}}},{"node":{"fields":{"slug":"/old/02-theory/05_layers_components","title":"Layers & Components"}}},{"node":{"fields":{"slug":"/old/02-theory/07_grasp2","title":"GRASP 2"}}},{"node":{"fields":{"slug":"/old/02-theory/09_gof1","title":"GoF 1"}}},{"node":{"fields":{"slug":"/old/02-theory/10_gof2","title":"GoF 2"}}},{"node":{"fields":{"slug":"/old/02-theory/11_solid","title":"SOLID"}}},{"node":{"fields":{"slug":"/old/02-theory/08_grasp3","title":"GRASP 3"}}},{"node":{"fields":{"slug":"/old/02-theory/design_class_diagram","title":"UML Design Class Notation"}}},{"node":{"fields":{"slug":"/old/02-theory/design_class_relations","title":"UML Design Class Relations"}}},{"node":{"fields":{"slug":"/old/02-theory/design_object_diagram","title":"UML Object Diagram Notation"}}},{"node":{"fields":{"slug":"/old/02-theory/99-exercises","title":"Exercises"}}},{"node":{"fields":{"slug":"/old/02-theory/design_package_diagram","title":"UML Package Notation"}}},{"node":{"fields":{"slug":"/old/02-theory/domain_class_diagram","title":"UML Domain Model"}}},{"node":{"fields":{"slug":"/old/02-theory/reading-instructions","title":"Reading Instructions"}}},{"node":{"fields":{"slug":"/old/03-assignments/01-assignment_1","title":"Assignment 1"}}},{"node":{"fields":{"slug":"/old/03-assignments/02-assignment_2","title":"Assignment 2"}}},{"node":{"fields":{"slug":"/old/03-assignments/03-assignment_3","title":"Assignment 3"}}},{"node":{"fields":{"slug":"/old/03-assignments/04-yahtzee","title":"Yahtzee Assignment"}}},{"node":{"fields":{"slug":"/old/old_template/ovningsuppgifter-del-a","title":"Övningsuppgifter del A"}}},{"node":{"fields":{"slug":"/old/old_template/ovningsuppgifter-del-b","title":"Övningsuppgifter del B"}}},{"node":{"fields":{"slug":"/old/03-assignments/01-assignment_1/lending-system-problem-description","title":"Stuff Lending System Problem Description"}}},{"node":{"fields":{"slug":"/old/03-assignments/01-assignment_1/yacht-club-problem-description","title":"Yacht Club Problem Description"}}},{"node":{"fields":{"slug":"/old/old_template/videologgar","title":"Vlog"}}},{"node":{"fields":{"slug":"/old/old_template/codeblock/1-index","title":"Sub Page"}}},{"node":{"fields":{"slug":"/old/03-assignments/02-assignment_2/test_specification","title":"Test Specification"}}},{"node":{"fields":{"slug":"/old/old_template/codeblock","title":"Syntax Highlighting"}}},{"node":{"fields":{"slug":"/old/old_template/ovningsuppgifter-del-a/01-hello-world","title":"Hello world"}}},{"node":{"fields":{"slug":"/old/old_template/ovningsuppgifter-del-a/02-simple-addition","title":"Enkel addition"}}}]}},"pageContext":{"id":"82fb2469-5818-5d3a-b761-f60856ee61cd"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}