Bài Giảng Phân tích thiết kế hướng đối tượng (phần 1) doc - Pdf 16

Object-Oriented Analysis and
Object-Oriented Analysis and
Design
Design
with Patterns, Process, and the UML
with Patterns, Process, and the UML
Introduction
Introduction
Introduction
Introduction

Welcome!

Introduction

Course leader: Dr. Trần Vũ Bình

Participants:

Hồ Thuỵ Hương Thuỷ (Tutor)

Prerequisites: Object-Oriented
Programming

Logistics
Overview and Objectives
Overview and Objectives

Learn how to “think in objects”

Requirements and analysis of the problem


You can do it by yourself

Form your team as early as possible
Hoa Sen University 4
Team Project – Online Enrolment
Team Project – Online Enrolment

Your client:

Hoa Sen University

Your goal:

Design a system to allow users to select
appropriate course, arrange schedule as
available

Manage studied/failed courses according to
curriculum.

Manage tuition set per course

Display marks, GPA and report

Taking the system online for student enrolment
Hoa Sen University 5
Project Task
Project Task


Lecture 1
Hoa Sen University 8
Today’s lecture topic
Today’s lecture topic

Object oriented concepts revisited

What’s OOAD?

Functional decomposition and its problem

What’s UML?

Software Development Process
Hoa Sen University 9
What is Object-Oriented?
What is Object-Oriented?

What is object?

What is class?

What is instance?

What is abstraction?

What is inheritance?

What is polymorphism?


Object vs. Function Oriented Analysis
Object vs. Function Oriented Analysis
Hoa Sen University 13
Library
Information
System
Structured A&D
Decompose by functions and processes
OOA&D
Decompose by objects and concepts
Catalogue Librarian
Book Library
Functional Decomposition
Functional Decomposition

A very simple development case

You are asked to write code to access a list of
shapes that were stored in a database then
display them

What steps we need to achieve this?
1.Locate the list of shapes in the database
2.Open up the list of shapes
3.Sort the list according to some order
4.Display the individual shapes on the monitor
Hoa Sen University 14
Functional Decomposition
Functional Decomposition



Get list of people in the class

For each person on this list,
do the following:

Find the next class he or she
is taking

Find the location of that class

Find the way to get from your
classroom to the persona’s
next class

Tell the person how to get to
his or her next class

Procedures needed:

A way of getting the list of
people in the class

A way of getting the schedule
for each person in the class

A program that gives
someone directions from
your classroom to any other
classroom

expect each person will figure out how to do
the task individually

Two kinds of objects

Instructor: responsible for posting the instruction

Students: knowing their own next classes, able to follow
the instruction

Key point: Shift of responsibility!
Hoa Sen University 19
Dealing with changing
Dealing with changing
requirements
requirements

Impact

What if you need to distinguish postgraduate
students from undergraduate students?

Option 1: change the control program a lot

Option 2: add an additional routine for
graduate students to follow

The second case can minimize changes
Hoa Sen University 20
Dealing with changing

a domain model that shows the noteworthy
domain concepts or objects, attributes, and
associations
Hoa Sen University 23
Player
name
DiceGame
Die
faceValue
Rolls
Plays
Includes
2
2
1
1
1
1
Key steps in OOAD [3]
Key steps in OOAD [3]

Interaction Diagram: shows the flow of
messages between software objects (method
invocation)
Hoa Sen University 24
:DiceGame
play()
die1 : Die
fv1 := getFaceValue()
die2 : Die


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status