chapters 10, 11 ssd (revision) sd dcd exam object-oriented design

40
Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

Upload: priscilla-brown

Post on 06-Jan-2018

223 views

Category:

Documents


3 download

DESCRIPTION

Approach: Chapter 11: “Advanced design is based on the concepts of use case realization by using Sequence diagrams and Design patterns Once you become proficient with these two subjects, you are an OO designer 3

TRANSCRIPT

Page 1: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

Chapters 10, 11

SSD (Revision)SDDCDExam

Object-Oriented Design

Page 2: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

2

Problem Statement: A customer wants to search for books written

by a specific author from a library. The customer wants to specify an author, and

gets the search results

Page 3: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

3

Approach: Chapter 11: “Advanced design is based on

the concepts of use case realization by using Sequence diagrams and Design patterns

Once you become proficient with these two subjects, you are an OO designer

Page 4: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

4

Use case: Components:

Actor Use case (What the system must do)

First: The EVENT table

Page 5: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

5

Event Type Trigger Source Use Case Response Destination

             

             

             

             

             

Page 6: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

6

Page 7: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

7

Page 8: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

8

Background: Object-oriented analysis models were

discussed in Chapters 2 - 5 Chapter 10, the fundamental principles:

A complete coverage of design principles and skills to at least do basic object-oriented design

Chapter 11 presents more advanced concepts particularly for detailed design with use case realizations: enhanced detailed design skills, and concepts related to design patterns, which are critically important for programming.

Page 9: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

9

Foundation: Object-oriented design is a process by which

a set of detailed object-oriented design models are built and then used by the programmers to write and test the new system.

One of the strengths of the object-oriented approach is that the design models are often just extensions of the requirements models.

Page 10: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

10

Page 11: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

11

Question: The previous slide shows the artefacts. Don’t

confuse with waterfall approach: What is our SDLC? What is agile development? Iterative development?

Page 12: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

12

Page 13: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

13

Notation SSD:

Page 14: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

14

Message Notation

Page 15: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

15

Page 16: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

16

Use Case Controller An artifact invented by the designer to

handle a system function Serves as a collection point for incoming

messages Intermediary between the outside world and

the internal system

Page 17: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

17

Page 18: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

18

Designing with Sequence Diagrams An SSD captures the interactions between the

system and the external world represented by actors The system is treated like a black box

A detailed sequence diagram (SD) uses all of the same elements as an SSD The :System object is replaced by all of the internal

objects and messages within the system

Page 19: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

19

Guidelines for Preliminary Sequence Diagram Development Determine all of the internal messages that

result from each input message Define origin and destination objects

Identify the complete set of classes that will be affected by each message

Flesh out the components for each message Iteration, true/false conditions, return

values, and passed parameters

Page 20: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

20

Developing a Multilayer Design View layer

Design the user interface for each use case Develop dialog designs for forms Add the window classes to the sequence diagram

Data access layer Initialize domain objects with data from the

database Query the database and send a reference object Return information in the reference object

Page 21: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

21

Search for Author: The Customer specifies an author on the

“Search Page” and then presses the Search button

The system validates the Customer’s search criteria

The system searches the Catalogue for books associated with the specified author

When the search is complete, the system displays the search results.

Page 22: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

22

Page 23: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

23

O-O program The previous slide shows how an object-

oriented program works. Hidden, it also illustrates the three-layer

architecture: Abstract Three Layer Architecture

Page 24: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

24

Objective of O-O design: The objective of object-oriented design is to

identify and specify all the objects that must work together to carry out each use case. As shown in Figure 10-1, these objects include user-interface objects, problem domain objects, and data access objects.

Can you identify these objects?

Page 25: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

25

Page 26: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

26

The OO diagrams: O-O analysis:

Use case, Use case description, Activity diagram, Domain Model Diagrams, System Sequence Diagram, State Machine Diagram

O-O design: Component diagrams, deployment diagrams,

design class diagrams, interaction diagrams, state machine diagrams, and package diagrams.

Page 27: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

27

Revision: An object class (or a class) is… Set of people Places Things Or transactions that share common attributes and perform

common functions to help an organization reaches its goals.

Page 28: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

28

Examples: People: employees, vendors, customers Places: warehouses, office, branches,

shipping docks Things: products, office equipment, supplies Transaction: purchases, sales, returns,

payments

Page 29: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

29

Example: Draw money from ATM Processes:

Insert credit card Enter PIN Enter Amount

What happens behind UI? Verification from bank system ……

Page 30: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

30

Classes? Customer ATM: ATM System Bank System

Page 31: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

31

Interaction: What message/communication takes place

between customer and ATM? Introducing Design Class Diagram: Customer wants to enter PIN If verified, Customer wants to draw money

Page 32: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

32

Page 33: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

33

Page 34: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

34

Three layer Architecture: user-interface objects, problem domain objects, and data access objects.

Page 35: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

35

Page 36: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

36

Two Things (p284-287): Identifying design classes: use interactions to

add operations to classes. Identifying stereotypes (<<…>>)in UML

models: Entity class Boundary class Control class Data access class

Page 37: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

37

Page 38: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

38

Page 39: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

39

Steps to follow: Develop use case, use case description,

activity diagram: Domain class diagram, SSD Draw the SD Sort-out the interactions or messages Add the operations/behaviour Can you identify the ‘three layer diagram’?

Page 40: Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design

40

Exam: Q1: p264, problems 1, 2, 3:system vision

document Q2: project management: NPV, Payback

period, graph, ROI: pr 4, 5, 6, 7 Q3:Network diagram Q4:UI design. Going to include blocks AppInv Q5: SD Q6: DCD