DIA .. drawing UML Diagrams Angelica Garcia Gutierrez email: - - PDF document

dia
SMART_READER_LITE
LIVE PREVIEW

DIA .. drawing UML Diagrams Angelica Garcia Gutierrez email: - - PDF document

Introduction to DIA .. drawing UML Diagrams Angelica Garcia Gutierrez email: a.garciagutierrez@iu-bremen.de tel: x3050 office: room 96, Research 1 320312 Software Engineering (P. Baumann) What is DIA? DIA is An open-source Linux program


slide-1
SLIDE 1

1

320312 Software Engineering (P. Baumann)

Introduction to

DIA

..drawing UML Diagrams

Angelica Garcia Gutierrez email: a.garciagutierrez@iu-bremen.de tel: x3050

  • ffice:

room 96, Research 1

2 320312 Software Engineering (P. Baumann)

What is DIA?

DIA is An open-source Linux program used to create diagrams Diagrams

  • Flowcharts, Network Diagrams, Simple circuits, and..
  • UML (Unified Modelling Language) diagrams

DIA File format

  • An XML type compressed with GZip
slide-2
SLIDE 2

2

3 320312 Software Engineering (P. Baumann)

Contents

Installation Starting DIA on the CLAMV machines Working with UML diagrams Saving / Exporting DIA files Questions 4 320312 Software Engineering (P. Baumann)

DIA Installation

Linux Platforms

  • download DIA from http://www.gnome.org/projects/dia/
  • save the file in your applications folder
  • in the terminal window enter:

>tar -zxvf <filename> >./configure >make

Windows (to date, DIA current version 0.94)

http://dia-installer.sourceforge.net/

slide-3
SLIDE 3

3

5 320312 Software Engineering (P. Baumann)

Starting DIA

(1) Connect to the appropiate CLAMV machine: in your terminal type: ssh -X [userID].[machine].clamv.iu-bremen.de enter password, and then type: dia & (3) Select File -New Diagram from the main menu (2) Select UML

6 320312 Software Engineering (P. Baumann)

UML (Unified Modelling Language)

  • Use case diagram
  • Class diagram

A piece of software can be seen from different views: Iteration Diagrams

  • Sequence diagram
  • Collaboration diagram

Physical Diagrams

  • Component diagram
  • Deployment diagram
  • State diagram
  • Activity diagram
slide-4
SLIDE 4

4

7 320312 Software Engineering (P. Baumann)

How to draw: Class Diagram

Adding classes:

On the Diagram Editor window, click on the class icon.

Suggested approach:

  • 1. Add as many class icons as you plan to use..

Consider the following technique: 1.1 From the requirements specification, pick all the nouns and noun phrases to identify prospective classes. 1.2 Discard nouns from the list when they are: redundant, vague, represent an operation, event or attribute, or are

  • utside the scope of the system.
  • 2. Define properties for each class..
  • 3. Establish relationships between classes..

8 320312 Software Engineering (P. Baumann)

Sample Class

Class name data (attributes)

  • perations

(methods) + public

  • private

# protected

slide-5
SLIDE 5

5

9 320312 Software Engineering (P. Baumann)

Class: Properties Specification

Double-click on the class icon Enter name of the class Define visibility in the diagram

10 320312 Software Engineering (P. Baumann)

Class: Attributes definition

Click on New to add attributes Name and Type of attribute Visibility options include: public, private, protected

slide-6
SLIDE 6

6

11 320312 Software Engineering (P. Baumann)

Class:

Constructor & Operations definition

Click on New to add operations Click on New to specify parameters for the chosen

  • peration

Use it to define a constructor Parameter type Constructor and Operations are defined

12 320312 Software Engineering (P. Baumann)

Class: Icons for Associations

Generalization One class is derived from the other. Every A is also a B. Aggregation One class has a reference to the

  • ther.

Abstraction One class implements the other. Composition A “has” relationship type.

Class A Class B

slide-7
SLIDE 7

7

13 320312 Software Engineering (P. Baumann)

Class:

Relationships

Double click on the dark line connecting the two classes.

Choose an appropriate association name Aggregation: The other class is part of this

  • ne but also

has an independent existence. Composition: The other class is part

  • f this class / possesses

a component of the

  • ther class

Example shows a 1 to Many association

14 320312 Software Engineering (P. Baumann)

Sample Class Diagram

Sample Class Diagram ([1] pag. 106)

slide-8
SLIDE 8

8

15 320312 Software Engineering (P. Baumann)

Saving/Exporting files

Saving

[Ctrl+Shift+S] or right click, file, save/save as

Exporting

Rigth click, file, export, select: .png (recommended)

16 320312 Software Engineering (P. Baumann)

Printing DIA diagrams

Typically:

Fit to 1 by 1 or Scale 30%

Printing

Right click, File – Page Setup

slide-9
SLIDE 9

9

17 320312 Software Engineering (P. Baumann)

DIA / UML resources

[1] The Unified Modelling Language User Guide, Grady Booch, James Rumbaugh, Ivar Jacobson

  • The DIA website (downloads & tutorials)

http://www.gnome.org/projects/dia/

  • A tutorial on UML:

http://www-306.ibm.com/software/rational/uml/

  • What associations really mean:

http://www.devx.com/enterprise/Article/28528

  • The On-line Resource for Embedded Systems

http://www.esemagazine.co.uk/search/search.cgi (type UML in the search box..)

18 320312 Software Engineering (P. Baumann)

Questions

?

(a.garciagutierrez@iu-bremen.de)