{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/old/02-theory/99-exercises",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnéuniversitetet","language":"sv","courseCode":"1DV607"}},"mdx":{"fields":{"id":"45924f14-5ca1-5523-9f1d-56e9abcb04c4","title":"Exercises","slug":"/old/02-theory/99-exercises"},"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\": \"Exercises\",\n  \"metaTitle\": \"Exercises in Object Oriented Analysis and Design\",\n  \"metaDescription\": \"Exercises in Object Oriented Analysis and Design\"\n};\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(\"p\", null, \"This page describes exercises connected to the course theory and assignments. The purpose is that you practice using these exercises, ask questions etc. They are a learning tool.\"), mdx(\"h2\", null, \"The Nutritionist tool\"), mdx(\"p\", null, \"You are to develop a tool for a nutritionist. The main concept is that the user (a nutritionist) should create an plan meals for clients. Clients have goals regarding body-composition and weight, and the user should be able to track these over time.\"), mdx(\"h3\", null, \"Basic Requirements\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to add, edit, delete and list clients.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to check detailed information for a selected client, this includes the meals, body composition and weight etc.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to add, edit, delete and list ingredients, with a name, price, meal type, macro nutrients, and kcal.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to add, edit, delete and list reicpes, a recipe consists of a number of ingredients, their amounts and possibly a comment, and step by step instructions.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to plan a week of recipes for a client, this includes several meals per day (breakfast, snack, lunch, dinner etc). This includes searching for suitable recipes using, name, price, meal type, kcal and/or macro nutrient contents.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The user should be able to view the progress of a user for a given time period, i.e. weight, body composition, and the caloric intake. This should be shown on a weekly basis. I.e. 10 weeks are selected, the information is shown for each week.\")), mdx(\"h2\", null, \"Exercise 1 -  Domain Modeling\"), mdx(\"p\", null, \"You may do the following 3 exercises interatively, i.e. focus on a subset of the requirements and do domain model, object diagram, scenarios for that subset and then add another subset.\"), mdx(\"h3\", null, \"Exercise 1.1 - Domain Model\"), mdx(\"p\", null, \"Create a domain model for the application.\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Find suitable conceptual classes\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Find suitable associations and refine them with names and multiplicites\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Find suitable attributes (no need to go over board here.)\")), mdx(\"h3\", null, \"Exercise 1.2 - Object Diagram\"), mdx(\"p\", null, \"Create at least one object diagram that shows the domain model \\\"in action\\\", i.e. whith proper instances of the classes and links based on the associations.\"), mdx(\"h3\", null, \"Exercise 1.3 - Execute Scenarios\"), mdx(\"p\", null, \"Create one or several scenarios (based on the requirments).\"), mdx(\"p\", null, \"\\\"Execute\\\" the scenario over the object diagram, is the information needed present in the model? If not you may need to update the domain model and/or object diagram.\"), mdx(\"h2\", null, \"Exercise 2 - Basic Design\"), mdx(\"h3\", null, \"Exercise 2.1 Model - View - Controller - Test\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Create a new java project and add automatic unit tests to it. You can use for example gradle.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Set up a basic MVC project structure using for example packages, or java-modules.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Create two sub-packages in the Model one for domain and one for persistance\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Make sure everything works, by implementing a simple \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"hello world\"), \" application, you should have at least one class in every major package and also an automatic test case.\")), mdx(\"h3\", null, \"Exercise 2.2 Basic Design\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Pick some interesting but basic part of the application and design and implement it. Start simple: for example \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"list clients\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"view client\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"list ingredients\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"view ingredient\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"list recipe\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"view recipe\"), \". Add more advanced functions as you go.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Add automatic test cases as you implement\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Keep a class diagram updated\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Check your design for issues: can you make it simpler? are you using ids and not objects, hidden dependencies, magic constants? have you put are ther view/controler responsibility in the model? does the model depend on the controller or view? is there model responsibility in the view/controller? Do you have a good division between the view and controller? Is any class growing too large?\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"If you find problems update and refine, test regularly.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Create an object and sequence diagram for a specific scenario, check the implementation and make sure the diagram and implementation corresponds to eachother\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"If still interesting, goto 1, maybe focusing on one aspect adding the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"add\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"edit\"), \" requirements.\"), mdx(\"h2\", {\n    parentName: \"li\"\n  }, \"Excercise 3 - Design Using Patterns\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#the-nutritionist-tool","title":"The Nutritionist tool","items":[{"url":"#basic-requirements","title":"Basic Requirements"}]},{"url":"#exercise-1----domain-modeling","title":"Exercise 1 -  Domain Modeling","items":[{"url":"#exercise-11---domain-model","title":"Exercise 1.1 - Domain Model"},{"url":"#exercise-12---object-diagram","title":"Exercise 1.2 - Object Diagram"},{"url":"#exercise-13---execute-scenarios","title":"Exercise 1.3 - Execute Scenarios"}]},{"url":"#exercise-2---basic-design","title":"Exercise 2 - Basic Design","items":[{"url":"#exercise-21-model---view---controller---test","title":"Exercise 2.1 Model - View - Controller - Test"},{"url":"#exercise-22-basic-design","title":"Exercise 2.2 Basic Design"}]}]},"parent":{"relativePath":"old/02-theory/99-exercises.md"},"frontmatter":{"metaTitle":"Exercises in Object Oriented Analysis and Design","metaDescription":"Exercises in Object Oriented Analysis and Design","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":"45924f14-5ca1-5523-9f1d-56e9abcb04c4"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}