0% found this document useful (0 votes)
15 views73 pages

Diagrams I CT 2622

Object oriented programming

Uploaded by

katlegotsebe5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views73 pages

Diagrams I CT 2622

Object oriented programming

Uploaded by

katlegotsebe5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Drawings and diagrams

Contents
Drawings and diagrams................................................................................................................................. 1
1 – Event list .................................................................................................................................................. 2
2 – Use case description ............................................................................................................................... 3
3 / 14 – Class diagrams / Domain model class diagrams .............................................................................. 6
16 – Generalization / specialization relationships ...................................................................................... 11
Whole part relationships ........................................................................................................................ 12
4 – Communication diagram ....................................................................................................................... 14
5 – use case diagram ................................................................................................................................... 17
6 – Activity Diagrams .................................................................................................................................. 24
7 – Sequence Diagram ................................................................................................................................ 29
8 – State machine diagram ......................................................................................................................... 41
9 – Entity relationship diagram ................................................................................................................... 53
12 – UML interaction diagram .................................................................................................................... 61
13 – CRC cards............................................................................................................................................. 71
1 – Event list
Definition:

EVENT – Anything that happens, especially something important or unusual.

Description:

Event list – Basically an ordered list of events

Example:

1 Create a luno account


2 Invest money
3 Lose money
4 Make a payment
5 Mortgage your house

How To:

List the events that need to be completed, in a logical order.


(Book doesn’t really go into much detail about Even-lists)
2 – Use case description
Definition:

Brief use case description - often one-sentence description that provides a quick
overview of a use case

Use case - A use case is a methodology used in system analysis to identify, clarify,
and organize system requirements.

Use case description - a textual model that lists and describes the processing
details for a use case

Example:

Brief use case description


Fully developed use case description

(Memorize the format, it is not provided in exams)


Format of Fully developed use case description:

1 Use case name


2 Scenario
3 Triggering event
4 Brief description
5 Actors
6 Related use cases
7 Stakeholders
8 Preconditions
9 Postconditions
10 Flow of activities Actor System
11 Exception conditions

How To:

The first and second compartments are used to identify the use case and the specific scenario within
the use case (if needed) that is being documented.

The third compartment identifies the event that triggers the use case.

The fourth compartment is a brief description of the use case.

The fifth compartment identifies the actor or actors. (Actors are shown as stick figures on use case
diagrams.)

The sixth compartment identifies other use cases and the way they are related to this use case.

The seventh compartment identifies stakeholders who are interested parties other than specific actors.

The eighth and ninth compartments—preconditions and postconditions—provide critical information


about the state of the system before and after the use case executes.

The tenth compartment in the template describes the detailed flow of activities of the use case.
3 / 14 – Class diagrams / Domain model class diagrams
Definition:

Class - a category or classification of a set of objects or things

Domain classes - classes that describes objects from the problem domain

Class diagram - a diagram consisting of classes (i.e., sets of objects) and


associations among the classes.

The UML class diagram is used to show classes of objects for a system. One type
of UML class diagram that shows the things in the users’ problem domain is
called the domain model class diagram

camelBack or camelCase notation - when words are concatenated to form a single word and the first
letter of each embedded word is capitalized

Domain model class diagram - a class diagram that only includes classes from the problem domain

Association class - an association that is also treated as a class; often required in order to capture
attributes for the association

Example:
How To:

Class diagram
Multiplicity of association

Association class
16 – Generalization / specialization relationships

(Builds of off class diagrams)

Definition: generalization/specialization relationships a type of hierarchical


relationship in which subordinate classes are subsets of objects of the superior
classes; an inheritance hierarchy.

Superclass: the superior or more general class in a generalization/specialization


relationship.

Subclass: the subordinate or more specialized class in a


generalization/specialization relationship.

Inheritance - the concept that specialization classes inherit characteristics of the generalization class.

Abstract - class a class that only exists in a model so subclasses can inherit from it.

Concrete - class a class that allows individual objects or instances to exist.

Example:
Whole part relationships
Definition:

Whole-part relationships - relationships between classes in which one class is a part or a component
portion of another class.

There are two types of whole-part relationships:


Aggregation - a type of whole-part relation- ship in which the component parts also exist as individual
objects apart from the aggregate.

Composition - a type of whole-part relation-ship in which the component parts cannot exist as individual
objects apart from the total composition.

Example:
4 – Communication diagram
Definition:

Communication diagram - type of interaction diagram that emphasizes the objects


that send and receive messages for a specific use case

Example:
How to:

.
5 – use case diagram
Definition: A UML use case diagram is the primary form of
system/software requirements for a new software program
underdeveloped. Use cases specify the expected behavior (what), and
not the exact method of making it happen (how). Use cases once
specified can be denoted both textual and visual representation
(i.e. use case diagram).

Use case diagram - the UML model used to illustrate use cases and their relationships to actors

«includes» relationship - a relationship between use cases in which one use case is stereotypically
included within the other use case

Example:
How To:
6 – Activity Diagrams
Definition:

Activity diagram - a UML diagram that describes user (or system) activities, the person or component
that completes each activity, and the sequential flow of these activities

Synchronization bar - an activity diagram component that either splits a control path into multiple
concurrent paths or recombines concurrent paths

Swimlane - an activity diagram component that divides the workflow activities into groups showing
which agent performs which activity

Example:
How To:
7 – Sequence Diagram
Definition:

System sequence diagram (SSD) a diagram showing the sequence of messages


between an actor and the automated part of the system during a use case or scenario.

lifeline, or object lifeline - the vertical line under an object on a sequence diagram to
show the passage of time for the object

loop frame - notation on a sequence diagram showing repeating messages

true/false condition - part of a message between objects that is evaluated prior to


transmission to determine whether the message can be sent

opt frame - notation on a sequence diagram showing optional messages

alt frame - notation on a sequence diagram showing if-then-else logic


Example:
How To:

Steps to develop an SSD:


8 – State machine diagram
Definition:

State - a condition during an object’s life when it satisfies some criterion, performs some action, or waits
for an event

Transition - the movement of an object from one state to another state

State machine diagram - a diagram showing the life of an object in states and transitions

Pseudostate - the starting point of a state machine diagram, indicated by a black dot

action- expressions descriptions of the activities performed as part of a transition

guard-condition - a true/false test to see whether a transition can fire

concurrency or concurrent states - the condition of being in more than one state at a time

path - a sequential set of connected states and transitions

concurrent paths when one or more states in a path are parallel to one or more states in another path

Example:
How To:
9 – Entity relationship diagram
Definition:

Data entities - the term used in ERD modeling to describe things about which the system needs to store
information

Entity-relationship diagram (ERD) a diagram consisting of data entities, their attributes, and their
relationships

Example:
How To:
12 – UML interaction diagram
Definition:

Example:
.
How To:
13 – CRC cards
Definition:

CRC cards - include a set of cards, with each card representing a class

CRC cards - a brainstorming and design technique for designing interactions in use cases by assigning
responsibilities and collaborations for classes

Example:
How To:
Steps:

You might also like