Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.

Similar presentations


Presentation on theme: "Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim."— Presentation transcript:

1 Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim

2 Topics Covered  Objects and object classes  An object-oriented design process  Design evolution

3 Object-Oriented Design  Object-oriented design  A design strategy where system designers think in terms of “things” instead of operations or functions  Object-oriented design process  Design object classes and the relationships between these classes

4 Objects And Object Classes  Object  An entity which 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  Object class  Objects are created according to object class definition  An object class definition serves as a template for objects

5 An Employee Object Class  UML (Unified Modeling Language) is a de facto standard for OO modeling and describes notations for a number of different OO models

6 A Generalization Hierarchy

7 An Association Model

8 An Object-Oriented Design Process The OOD process has a number of stages  Stage 1: understand and define the context and the models of use of the system  Stage 2: design the system architecture  Stage 3: identify the principal objects in the system  Stage 4: develop design models  Stage 5: specify object interfaces

9 Weather System Description (1/2)  A weather mapping system is required to generate weather maps on a regular basis using data collected from remote, unattended weather stations and other data sources such as weather observers, balloons and satellites. Weather stations transmit their data to the area computer in response to a request from that machine.  The area computer system validates the collected data and integrates it with the data from different sources. The integrated data is archived and, using data from this archive and a digitized map database, a set of local weather maps is created. Maps may be printed for distribution on a special-purpose map printer or may be displayed in a number of different formats.

10 Weather System Description (2/2)  A weather station is a package of software-controlled instruments which collects data, performs some data processing and transmits this data for further processing. The instruments include air and ground thermometers( 온도계 ), an anemometer( 풍 력계 ), a wind vane( 풍향계 ), a barometer( 기압계 ) and a rain gauge. Data is collected every five minutes.  When a command is issued to transmit the weather data, the weather station processes and summarizes the collected data. The summarized data is transmitted to the mapping computer when a request is received.

11 System Context And Models Of Use  The system context and the model of system use represent two complementary models of the relationships between a system and its environment  The system context is a static model that describes the other systems in that environment  The model of the system use is a dynamic model that describes how the system interacts with its environment. The UML proposes to use use- cases to show interactions

12 Subsystems In Weather Mapping System

13 Use-Cases For Weather Station

14 Report Use-Case Description

15 Architectural Design  Once interactions between the system and its environment have been understood, we use this information for designing the system architecture  Layered architecture is appropriate for the weather station  Interface layer for handling communications  Data collection layer for managing data collection from instruments and summarizing the weather data  Instruments layer for collecting raw data

16 Weather Station Architecture

17 Object Identification  Identifying objects (or object classes) is the most difficult part of object-oriented design  There is no ‘magic formula’ for object identification. It relies on the skill, experience and domain knowledge of system designers  Object identification is an iterative process. We are unlikely to get it right first time

18 Weather Station Object Classes

19 Design Models  Design models show the objects and object classes and relationships between these entities  Static models describe the static structure of the system in terms of object classes and relationships  Important relationships are generalization relationships, uses/used-by relationships and composition relationship  Dynamic models describe the dynamic interaction between objects  Sequence of service requests made by objects  How the state of the system is related to these object interactions

20 Examples Of Design Models  Sub-system models that show logical groupings of objects into coherent subsystems  Sequence models that show the sequence of object interactions  State machine models that show how individual objects change their state in response to events  Other models include use-case models, aggregation models, generalization models, etc.

21 A Subsystem Model

22 A Sequence Model

23 A State Chart

24 Object Interface Specification  Object interfaces have to be specified so that the objects and other components can be designed in parallel  Designers should try to avoid including details of the interface representation in their interface design  Objects may have several interfaces which are viewpoints on the methods provided

25 Weather Station Interface

26 Design Evolution  Hiding information inside objects means that changes made to an object do not affect other objects in an unpredictable way  Assume pollution monitoring facilities are to be added to weather stations. This involves adding an air quality meter to compute the amount of various pollutants in the atmosphere  Pollution readings are transmitted with weather data

27 New Objects To Support Pollution Monitoring


Download ppt "Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim."

Similar presentations


Ads by Google