Bài giảng Introduction to Software Engineering - Week 7: Object-Oriented Design - Nguyễn Thị Minh Tuyền

Week 7:  
Object-Oriented Design  
Nguyễn Thị Minh Tuyền  
Adapted from sSlidoemsmoef rIavnille  
Topics covered  
1. Object-oriented design using the UML  
2. Design patterns  
3. Open source development  
2
Design and implementation  
£ Software design and implementation is the stage in the  
software engineering process at which an executable  
software system is developed.  
£ Software design and implementation activities are  
invariably inter-leaved.  
p Software design is a creative activity in which you identify software  
components and their relationships, based on a customer's  
requirements.  
p Implementation is the process of realizing the design as a  
program.  
3
Build or buy  
£ In a wide range of domains, it is now possible to buy off-  
the-shelf systems (COTS) that can be adapted and tailored  
to the users’ requirements.  
p Example: if you want to implement a medical records system, you  
can buy a package that is already used in hospitals. It can be  
cheaper and ster to use this appoach aer than developing a  
system in a conventional programming language.  
£ When you develop an application in this way, the design  
process becomes concerned with how to use the  
configuration features of that system to deliver the system  
requirements.  
4
Topics covered  
1. Object-oriented design using the UML  
2. Design patterns  
3. Open source development  
5
Object-oriented development  
£ Object-oriented analysis (OOA), design (OOD) and  
programming (OOP) are related but distinct.  
£ OOA is concerned with developing an object model of the  
application domain.  
£ OOD is concerned with developing an object-oriented  
system model to implement requirements.  
£ OOP is concerned with realising an OOD using an OO  
programming language such as Java or C++.  
6
Objects and object classes  
An object is an entity that has a state and a defined set of  
operations which operate on that state.  
The state is represented as a set of object attributes.  
The operations associated with the object provide services  
to other objects (clients) which request these services when  
some computation is required.  
Objects are created according to some object class  
definition.  
An object class definition serves as a template for objects. It  
includes declarations of all the attributes and services which  
should be associated with an object of that class.  
7
An OOD process  
£ Structured OOD processes involve designing object  
classes and relationship between these classes.  
£ Object-oriented systems are easier to change than systems  
developed using functional approaches.  
p Objects include both data and operations to manipulate that data.  
p They may thdified as stand-alone  
entities.  
£ Changing the implementation of an object or adding  
services should not affect other system objects.  
8
Process stages  
£ To develop an OOD from concept to detailed, there are  
several things that you need to do:  
Define the context and modes of use of the system  
Design the system architecture  
Identify the principal system objects  
Develop design models  
Specify object interfaces  
9
Process stages  
£ To develop an OOD from concept to detailed, there are  
several things that you need to do:  
Define the context and modes of use of the system  
Design the system architecture  
Identify the principal system objects  
Develop design models  
Specify object interfaces  
10  
System context and interactions  
£ Understanding the relationships between the software that  
is being designed and its external environment is essential  
for deciding  
p how to provide the required system functionality and  
p how to structure the system to communicate with its environment.  
£ Understanding of the context also lets you establish the  
boundaries of the system. Setting the system boundaries  
helps you decide  
p what features are implemented in the system being designed and  
p what features are in other associated systems.  
11  
Context and interaction models  
£ System context  
p A static model that describes other systems in the  
environment.  
p Use a subsystem model to show other systems.  
£ Model of sy
p A dynamic model that describes how the system  
interacts with its environment.  
p Use use-cases to show interactions  
12  
System context for the weather station  
Control  
system  
1
1
1
1..n  
Weather  
information  
system  
1
1..n  
Weather  
station  
1
1..n  
Satellite  
1
1
13  
Weather station use cases  
Report  
weather  
Report status  
Weather  
information  
system  
Restart  
Shutdown  
Reconfigure  
Control  
Remote  
control  
14  
Use case description—Report weather  
System  
Use case  
Actors  
Weather station  
Report weather  
Weather information system, Weather station  
Description  
The weather station sends a summary of the weather data that has  
been collected from the instruments in the collection period to the  
weather information system. The data sent are the maximum,  
minratures; the maximum,  
minimum, and average air pressures; the maximum, minimum, and  
average wind speeds; the total rainfall; and the wind direction as  
sampled at five-minute intervals.  
Stimulus  
The weather information system establishes a satellite  
communication link with the weather station and requests  
tran
Response  
The summarized data is sent to the weather information system.  
Comments  
Weather stations are usually asked to report once per hour but this  
frequency may differ from one station to another and may be  
modified in the future.  
15  
Process stages  
£ To develop an OOD from concept to detailed, there are  
several things that you need to do:  
Define the context and modes of use of the system  
Design the system architecture  
Identify the principal system objects  
Develop design models  
Specify object interfaces  
16  
Architectural design  
£ Once interactions between the system and its  
environment have been understood, you use  
this information for designing the system  
architecture.  
p identify at make up the  
system and their interactions, and  
p then organize the components using an  
architectural pattern such as a layered or client-  
server model.  
17  
High-level architecture of the weather station  
«subsystem»  
Configuration manager  
«subsystem»  
Power manager  
«subsystem»  
Fault manager  
Communication link  
«subsystem»  
Communications  
«subsystem»  
«subsystem»  
Instruments  
18  
Weather station architecture  
Architecture of data collection  
system  
Data collection  
Receiver  
Transmitter  
WeatherData  
20  
Tải về để xem bản đầy đủ
pdf 59 trang yennguyen 13/04/2022 3580
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Introduction to Software Engineering - Week 7: Object-Oriented Design - Nguyễn Thị Minh Tuyền", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_introduction_to_software_engineering_week_7_object.pdf