Översikt

  • This module covers software modeling and implementation, and consists of one lecture, two chapters in the book, one quiz and one written assignment.

    • Sida icon

      This module has of one compulsory and nine recommended videos. 

      1. Module introduction and overview by Casper Lassenius (40 min)

      Recommended (highly recommended in bold font) videos - Derek Banas UML 2.0 Tutorial

      1. UML 2.0 Tutorial - Use Case Diagrams (13 min)
      2. UML 2.0 Activity Diagrams (12 min)
      3. UML 2.0 Class Diagrams (17 min)
      4. UML 2.0 Sequence Diagrams (12 min)
      5. UML 2.0 Communication Diagrams (10 min)
      6. UML 2.0 Timing Diagrams (9 min)
      7. UML 2.0 Component Diagrams (18 min)
      8. UML 2.0 State Machine Diagrams (13 min)
      9. UML 2.0 Deployment Diagrams (8 min)
    • Fil icon
    • Tillgänglig om: You are a(n) Studerande
      Fil icon
      Reading 1: Software Design Fil PDF

      Excerpt from: Sommerville, I. (2016) Software engineering. Tenth edition. Boston, USA: Pearson.

       

    • Tillgänglig om: You are a(n) Studerande
      Fil icon
      Reading 2: UML@Classroom Fil PDF

      Supporting material for the written exercise. Use it to support your work in doing the exercises, and read-only as much as required. Tip: use it as a reference manual.

      Seidl, M. et al. (2015) UML@Classroom: an introduction to object-oriented modeling. New York, NY: Springer.

    • Kunskapstest icon
      Module 7 quiz Kunskapstest

      Quiz on Software modeling and implementation 

      Do not take this quiz until you have studied the readings AND listened to the lecture.

      The quiz is timed, and you have 30 minutes to do it. 

      You are allowed two attempts. You will get the grade of your best attempt. You will be shown the correct answers to the questions only after the quiz is closed.

    • Inlämningsuppgift icon
      Assignment: Software Modeling Inlämningsuppgift

      In this exercise, you will both read and create software design diagrams. Use Reading 2: UML@Classroom and the linked videos explaining the various diagram types to aid your work.

      This assignment contains four subtasks. Use the lecture videos, as well as Reading 2: UML@Classroom to help you.

      1. Explain the following use-case diagram.

      Use-case diagram

      2. Class diagram

      Model a simplified email system using a UML class diagram. The system consists of several core components that interact with one another. Your class diagram must represent these components, their relationships, and relevant details such as attributes and methods.

      Components to Model:

      1. User
        • Users interact with the email system.
        • Each user has a unique username and email address.
        • Users can send and receive emails.
        • Methods: sendEmail(), receiveEmail()
      2. Email
        • Represents an email message.
        • Each email has a sender, recipient(s), a subject, and a body.
        • Emails can have attachments.
        • Methods: addAttachment(), removeAttachment(), send()
      3. Attachment
        • Represents an attachment to an email.
        • Each attachment has a filename and a file size.
        • An email can have zero or more attachments.
        • Methods: download(), getSize()
      4. Inbox
        • Each user has an inbox to store received emails.
        • An inbox can contain multiple emails.
        • Methods: addEmail(), removeEmail()

      Requirements:

      1. Generalization:
        • Model a generalization relationship between User and a possible subclass, AdminUser, which has additional methods to manage system users (e.g., addUser(), removeUser()).
      2. Relationships & Multiplicities:
        • Each User can have one Inbox, but each Inbox can have many emails.
        • Each Email must have one sender (a User), and one or more recipients (Users).
        • Represent relationships using appropriate multiplicities.
      3. Attributes:
        • Each class should include at least two attributes that represent important characteristics (e.g., username in User, subject in Email, filename in Attachment).
      4. Methods:
        • Include methods for each class that describe its basic functionality (e.g., sendEmail() for User, download() for Attachment).

      In addition to drawing the diagram, please also provide a brief description explaining the key relationships and design choices you made.

      3. Sequence diagram

      Explain the following sequence diagram:

      Sequence diagram

      4. State chart

      Draw a UML state-chart diagram that models the behavior of a coffee machine. The machine allows users to select different types of coffee, brews the coffee, and dispenses it. Your diagram should show the various states of the coffee machine and how it transitions between those states.

      Coffee Machine Behavior:

      The coffee machine can transition between several states during its operation. Below is a description of the states and selections to include:

      1. Idle State
        • The machine starts in the idle state, waiting for a user to make a coffee selection.
        • It will transition out of this state when a user selects a coffee type.
      2. Coffee Selection State
        • The user selects one of the available coffee types: EspressoCappuccino, or Latte
        • After the selection is made, the machine verifies that there are sufficient ingredients to make the coffee.
        • If the selection is valid and ingredients are available, it transitions to the brewing state. If not, it transitions to the error state.
      3. Brewing State (Compound State)
        • After a valid selection, the machine enters the brewing state. This state consists of two concurrent actions:
        • Water Heating: The machine heats the water.
        • Bean Grinding: The machine grinds the coffee beans.
        • Both actions must complete before brewing is finished.
        • The brewing process can vary slightly depending on the coffee type selected (e.g., more milk for Latte or foam for Cappuccino).
      4. Dispensing State
        • After brewing, the machine dispenses the selected coffee (Espresso, Cappuccino, or Latte) to the user.
        • Once dispensing is complete, the machine returns to the idle state.
      5. Error State
        • If there is an issue during selection (e.g., not enough ingredients or invalid selection), the machine enters the error state.
        • After the issue is resolved, the machine returns to the idle state.

      Requirements:

      1. States:
        • Identify and model the different states of the coffee machine (e.g., idle, coffee selection, brewing, dispensing, error).
      2. Initial State:
        • The diagram should start with an initial state leading to the idle state.
      3. Coffee Selection:
        • Explicitly model the coffee selection state where the user chooses from EspressoCappuccino, or Latte.
      4. Compound State:
        • Model the brewing process as a compound state with two concurrent activities: water heating and bean grinding.
      5. Concurrent States:
        • Represent water heating and bean grinding as concurrent states during the brewing process.
      6. Transitions:
        • Model the transitions between states, including events or triggers that cause state changes (e.g., selection made, brewing completed, error encountered).

      In addition to the diagram, please provide a short explanation describing your diagram, focusing on the coffee selection, compound, and concurrent states.


    • Fil icon

      Gorschek, T, Tempero, E. and Angelis, L. 2014. On the use of software design models in software development practice: An empirical investigation. Journal of Systems and Software 95 (2014), pp. 176-193.

      An interesting study on the real-world use of design models.