uml diagrams...uml is just... a graphical way of describing software systems. (and other business...

30
UML Diagrams Software Engineering Spring 2021 Esther Brown & Mary Warren

Upload: others

Post on 01-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • UML DiagramsSoftware Engineering Spring 2021

    Esther Brown & Mary Warren

  • What is UML?Unified Modeling Language

  • UML is just...a graphical way of

    describing software systems.

    (And other business processes)

    The Main Aim of UMLis to define a standard way to visualize the way a system has been designed.

    It is similar to blueprints used in other fields of engineering

  • A Brief History of UML

  • 3 AmigosGrady Booch

    Developed in the Mid-1990’s

    All 3 men worked together at a company called Rational Software. Each had previously developed their own methodology and notation for Object Oriented Software.

    PROBLEM: There were several different methodologies and notations for creating software, but no clear universal standard.

    SOLUTION: The 3 Amigos used UML merged a number of competing modeling notations that were in use by the software industry at the time.

    In 1997, UML 1.0 was submitted to the Object Oriented Management Group for review. It was revised to UML 1.1 and adopted later that year.

    Version 1 was mainly focused on modeling software systems, particularly object oriented software systems. Version 2.0 produced enhancements and also made UML suitable for representing a larger scope of business processes in general.

    Jim Rumbaugh

    Ivar Jacobson

  • “You can model just about any type of application, running on any type and combination of hardware, OS, programming language, and network, in UML....Built upon fundamental OO concepts including class and operation, it's a natural fit for object-oriented languages and environments such as C++, Java, and the recent C#, but you can use it to model non-OO applications as well. UML Profiles (that is, subsets of UML tailored for specific purposes) help you model Transactional, Real-time, and Fault-Tolerant systems in a natural way.”

    FROM UML.ORG

  • What kinds of problems does modeling with UML solve?

    UML provided a standardized language for notating and modeling software.

    Large software projects have a huge probability of failure. Modeling is the only way to visualize your design and check it against requirements before coding begins.(uml.org)

    Modeling ensures that:

    ● business functionality is complete and correct ● end-user needs are met ● program design supports requirements for scalability, robustness, security,

    extendibility, and other characteristics.

    Using UML in modeling minimizes the likelihood of difficult and expensive changes.

  • Understanding a system just by looking at the source code, can be a bit time consuming.UML is designed to increase understanding and ultimately communication.

    public class Book { private String name; private String publisher; private ArrayList authors;

    // constructor

    public ArrayList getAuthors() { return this.authors; }

    public void addAuthor(Person author) { this.authors.add(author); }}

  • Raising the level of abstraction

    ● Models help us work at a higher level of abstraction by seeing the bigger picture at work.

    ● Details may be hidden or masked to improve clarity of the prototype.● Utilizing UML helps to improve visualization of connections to other

    applications and environments.

    Example: On-Click Events

  • Do we really need UML?

    ❏ Complex applications need collaboration and planning from multiple teams and hence require a clear and concise way to communicate amongst them.

    ❏ Not everyone understands code. UML is essential for communication.

    ❏ Total time saver because teams are able to visualize processes, user interactions and static structure of the system.

    YES!

  • Basic Notations

    https://www.tutorialspoint.com/uml/uml_basic_notations.htm

  • 13 Types of DiagramsDivided into 3 categories: Structure Diagrams:

    1.Class Diagram2.Object Diagram3.Component Diagram4.Composite Structure Diagram5.Package Diagram6.Deployment Diagram

    Behavior Diagrams:

    7.Use Case Diagram (used by some methodologies during requirements gathering)8.Activity Diagram9.State Machine Diagram.

    Interaction Diagrams: all derived from the more general Behavior Diagram,

    10.Sequence Diagram11.Communication Diagram12.Timing Diagram13.Interaction Overview Diagram.

  • Class Diagram

    A class diagram is used to model classes. This diagram from the book shows how several classes relate to each other.This diagram models a class called horses and shows how it interacts with other classes.

  • Component Diagram

    A component diagram is an abstracted view of the system that is being constructed.This diagram models the components of a online store.

  • Object Diagram

    An object diagram shows the relation between the instantiated classes and the defined class, and the relation between these objects in the system.This one models a company.

  • Composite Structure

    This allows users to visuals the composition of a object. This example is the composition of the object StoreManager.

  • Deployment Diagram

    Shows the structure of a software system and is useful for visualizing how the software is physically distributed. The hardware components are the boxes, and the lines show what is used to connect them.

  • Package Diagram

    This is used to simplify diagrams. Classes are packed down into a package to simply represent several classes together.This example shows a business model. The packages are the folder shapes and the dotted lines are dependencies.

  • Use-case Diagram

    Describes how a user interacts with a system by defining the steps to accomplish a specific goal. This diagram is for a music system. The actor is the user interacting with the system. The ovals represents use cases.

  • Activity Diagram

    This diagram visualizes the dynamic behavior of a system through the flow of of control between actions that the system performs. This one shows how to make a cake. The black rectangles represents a fork which indicates a activity splitting into two or more concurrent activities.

  • State Machine Diagram

    Diagram models the object’s states, the possible actions associated with the state, and the transitions between the states. This diagram is for advancing past white space and comments in Java.

  • Interaction Diagram

    Is a subgroup of behavior diagrams. It is comprised of Sequence, Communication,and Timing diagrams. The purpose of these diagrams is to visualize the interactive behavior of a system.

  • Sequence Diagram

    A sequence diagram is used to show the dynamic communications between objects during the execution of a task.This is an example of a diagram for a drawing program.

  • Communication Diagram

    Indicates the timing of the communications, this diagram focuses on the relationships between objects and classes. The communication diagram example is based of off the sequence diagram but instead shows the relationship.

  • Timing Diagram

    Are used when the primary purpose of the diagram is to reason about time. These two diagrams show the two different notations used in timing diagrams. They both show the time involved with a user trying to access a system.

  • Demonstrations: LucidChart UML Class Diagrams

  • Demonstration

    Class Diagram

  • Demonstrations: Code Generation Software

    StarUML

    Demo Video

    https://staruml.io/https://www.loom.com/share/1274f94d766344c6893276fe077732ab

  • Demonstrations: LucidChart UML Sequence Diagrams

  • Refeneces

    Works Cited

    What Is Component Diagram?, www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-component-diagram/.

    What Is Composite Structure Diagram?, www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-composite-structure-diagram/.

    What Is Package Diagram?, www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-package-diagram/.

    What Is Component Diagram?, www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-component-diagram/.

    What Is Object Diagram?, www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-object-diagram/.

    Pressman, Roger S., and Bruce R. Maxim. Software Engineering: a Practitioner's Approach. McGraw-Hill Education, 2020.

    Salma. “UML Class Diagrams Tutorial, Step by Step.” Medium, Medium, 1 Sept. 2017, medium.com/@smagid_allThings/uml-class-diagrams-tutorial-step-by-step-

    520fd83b300b.

    “Timing Diagram.” Timing Diagram - an Overview | ScienceDirect Topics, www.sciencedirect.com/topics/computer-science/timing-diagram.

    “UML - Interaction Diagrams.” Tutorialspoint, www.tutorialspoint.com/uml/uml_interaction_diagram.htm.

    Slide 1What is UML? Unified Modeling LanguageUML is just...A Brief History of UML3 AmigosSlide 6What kinds of problems does modeling with UML solve?Slide 8Raising the level of abstractionDo we really need UML?Basic Notations13 Types of DiagramsClass DiagramComponent DiagramObject DiagramComposite StructureDeployment DiagramPackage DiagramUse-case DiagramActivity DiagramState Machine DiagramInteraction DiagramSequence DiagramCommunication DiagramTiming DiagramDemonstrations: LucidChart UML Class DiagramsDemonstrationDemonstrations: Code Generation SoftwareDemonstrations: LucidChart UML Sequence DiagramsRefeneces