SOFTWARE DESIGN AND ARCHITECTURE LECTURE 24. Review ANALYSIS Level Class Diagram – Identifying Entities – Identifying Attributes – Identifying Operations.

Slides:



Advertisements
Similar presentations
Object-oriented modeling Class/Object Diagrams
Advertisements

Analysis Modeling.
Chapter 8 Analysis Engineering Software Engineering: A Practitioner’s Approach by Roger S. Pressman.
System Sequence Diagrams (SSD). Recap Concepts of Action, Pins and Activity Description of activity nodes and activity edges New notations – Activity.
Software Requirements Engineering Elaboration Process Lecture-13.
CRC Modeling. Recap Class Modeling – How to Identify classes, its attributes and functions? – Class selection criteria – Relationships Associations Generalization.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
Chapter 8 Analysis Modeling
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
1 CSc 131 Computer Software Engineering Fall 2012 Lecture # 7 Object-Oriented Design & UML Class Models.
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
These slides are designed to accompany Web Engineering: A Practitioner’s Approach (The McGraw-Hill Companies, Inc.) by Roger Pressman and David Lowe, copyright.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
Data Flow Diagrams.
Chapter 8 Analysis Engineering (分析工程) Software Engineering: A Practitioner’s Approach by Roger S. Pressman Software Engineering: A Practitioner’s Approach.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 8: Analysis Modeling Software Engineering: A Practitioner’s Approach, 6/e Chapter.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Class-based Modeling.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
Object Oriented Analysis
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
Chapter 5 System Modeling Sommerville, "software engineering ", 9 th Ed., 2011.
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Class Modeling Design Class diagram. Classes The term “class ” refers to a group of objects that share a common attributes and common behaviour (operations).
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Software Engineering Lecture 8 Object-Oriented Analysis.
Chapter 10 요구사항 모델링 : 클래스 기반 방법론 Requirements Modeling: Class-Based Methods 임현승 강원대학교 Revised from the slides by Roger S. Pressman and Bruce R. Maxim for.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Data Modelling 2014, Fall Pusan National University Ki-Joune Li.
Elements Of Modeling. 1.Data Modeling  Data modeling answers a set of specific questions that are relevant to any data processing application. e.g. ◦
Chapter 8 Analysis Engineering
Elaboration Process Lecture-16.
Unified Modeling Language (UML)
UML Diagrams: Class Diagrams The Static Analysis Model
Cmpe 589 Spring 2006.
COMP 2710 Software Construction Class Diagrams
Class diagram Description
UML Class Diagrams: Basic Concepts
Lec 3: Object-Oriented Data Modeling
2018, Fall Pusan National University Ki-Joune Li
UML Class Diagram.
Chapter 10 Requirements Modeling: Class-Based Methods
Unified Modelling Language
Understand and Use Object Oriented Methods
Object Oriented System Design Class Diagrams
2019, Fall Pusan National University Ki-Joune Li
Presentation transcript:

SOFTWARE DESIGN AND ARCHITECTURE LECTURE 24

Review ANALYSIS Level Class Diagram – Identifying Entities – Identifying Attributes – Identifying Operations – Identifying Relationships

Outline Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations – Multiplicity – Aggregation – Composition – Generalization

CLASS DIAGRAM

5 Essential Elements of a UML Class Diagram Class Attributes Operations Relationships – Associations – Generalization – Dependency – Realization Constraint Rules and Notes

6 What is a Class Diagram? A class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. – A graphical representation of a static view on declarative static elements. A central modeling technique that runs through nearly all object-oriented methods. The richest notation in UML.

Classes A class is the description of a set of objects having similar attributes, operations, relationships and behavior. 7 Window size: Size visibility: boolean display() hide() Class Name Attributes Operations

Identifying Analysis Classes 1)Perform a grammatical parse of the problem statement or use cases 2)Classes are determined by underlining each noun or noun clause 3)A class required to implement a solution is part of the solution space 4)A class necessary only to describe a solution is part of the problem space 5)A class should NOT have an imperative procedural name (i.e., a verb) 6)List the potential class names in a table and "classify" each class according to some taxonomy and class selection characteristics 7)A potential class should satisfy nearly all (or all) of the selection characteristics to be considered a legitimate problem domain class (More on next slide) Potential classesGeneral classification Selection Characteristic s

Grammatical Parse The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs. When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained. The homeowner receives security information via a control panel, the PC, or a browser, collectively called an interface. The interface displays prompting messages and system status information on the control panel, the PC, or the browser window. Homeowner interaction takes the following form…

Grammatical Parse The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs. When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained. The homeowner receives security information via a control panel, the PC, or a browser, collectively called an interface. The interface displays prompting messages and system status information on the control panel, the PC, or the browser window. Homeowner interaction takes the following form…

General classifications for a potential class – External entity (e.g., another system, a device, a person) – Thing (e.g., report, screen display) – Occurrence or event (e.g., movement, completion) – Role (e.g., manager, engineer, salesperson) – Organizational unit (e.g., division, group, team) – Place (e.g., manufacturing floor, loading dock) – Structure (e.g., sensor, vehicle, computer) Identifying Analysis Classes (continued) (More on next slide)

Class Selection Criteria 1.Retained information 2.Needed services 3.Multiple attributes 4.Common attributes 5.Common operations 6.Essential requirements

Identifying Classes Potential classClassificationAccept / Reject homeownerrole; external entityreject: 1, 2 fail sensorexternal entityaccept control panelexternal entityaccept installationoccurrencereject (security) systemthingaccept number, typenot objects, attributesreject: 3 fails master passwordthingreject: 3 fails telephone numberthingreject: 3 fails sensor eventoccurrenceaccept audible alarmexternal entityaccept: 1 fails monitoring serviceorganizational unit; eereject: 1, 2 fail

Defining Attributes of a Class Attributes of a class are those nouns from the grammatical parse that reasonably belong to a class Attributes hold the values that describe the current properties or state of a class An attribute may also appear initially as a potential class that is later rejected because of the class selection criteria In identifying attributes, the following question should be answered – What data items (composite and/or elementary) will fully define a specific class in the context of the problem at hand? Usually an item is not an attribute if more than one of them is to be associated with a class

Defining Operations of a Class Operations define the behavior of an object Four categories of operations – Operations that manipulate data in some way to change the state of an object (e.g., add, delete, modify) – Operations that perform a computation – Operations that inquire about the state of an object – Operations that monitor an object for the occurrence of a controlling event An operation has knowledge about the state of a class and the nature of its associations The action performed by an operation is based on the current values of the attributes of a class Using a grammatical parse again, circle the verbs; then select the verbs that relate to the problem domain classes that were previously identified

Identifying operations The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs. When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained. The homeowner receives security information via a control panel, the PC, or a browser, collectively called an interface. The interface displays prompting messages and system status information on the control panel, the PC, or the browser window. Homeowner interaction takes the following form…

Identifying operations The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs. When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained. The homeowner receives security information via a control panel, the PC, or a browser, collectively called an interface. The interface displays prompting messages and system status information on the control panel, the PC, or the browser window. Homeowner interaction takes the following form…

Class Diagram Processor

Class Diagram Class diagram for FloorPlan

Class Diagrams Top: Multiplicity Bottom: Dependencies

21 Associations A semantic relationship between two or more classes that specifies connections among their instances. A structural relationship, specifying that objects of one class are connected to objects of a second (possibly the same) class. Example: “An Employee works for a Company” CompanyDepartmentEmployee

22 Associations (cont.) An association between two classes indicates that objects at one end of an association “recognize” objects at the other end and may send messages to them. – This property will help us discover less trivial associations using interaction diagrams.

23 Associations (cont.) StaffMemberStudent 1..**instructs instructor Association name Role name Multiplicity Navigable (uni-directional) association Courses pre - requisites 0..3 Reflexive association Role *

UML Class Diagrams24 Associations (cont.) To clarify its meaning, an association may be named. – The name is represented as a label placed midway along the association line. – Usually a verb or a verb phrase. A role is an end of an association where it connects to a class. – May be named to indicate the role played by the class attached to the end of the association path. Usually a noun or noun phrase Mandatory for reflexive associations

UML Class Diagrams25 Associations (cont.) Multiplicity – The number of instances of the class, next to which the multiplicity expression appears, that are referenced by a single instance of the class that is at the other end of the association path. – Indicates whether or not an association is mandatory. – Provides a lower and upper bound on the number of instances.

UML Class Diagrams26 Associations (cont.) – Multiplicity Indicators Exactly one1 Zero or more (unlimited)* (0..*) One or more1..* Zero or one (optional association)0..1 Specified range2..4 Multiple, disjoint ranges2, 4..6, 8

27 Aggregation A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. – Models a “is a part-part of” relationship. Whole Part Car Door House 1..*2..*

UML Class Diagrams28 Aggregation (cont.) Aggregation tests: – Is the phrase “part of” used to describe the relationship? A door is “part of” a car – Are some operations on the whole automatically applied to its parts? Move the car, move the door. – Are some attribute values propagated from the whole to all or some of its parts? The car is blue, therefore the door is blue. – Is there an intrinsic asymmetry to the relationship where one class is subordinate to the other? A door is part of a car. A car is not part of a door.

UML Class Diagrams29 Composition A strong form of aggregation – The whole is the sole owner of its part. The part object may belong to only one whole – Multiplicity on the whole side must be zero or one. – The life time of the part is dependent upon the whole. The composite must manage the creation and destruction of its parts. CirclePoint 3..* 1 Polygon Point Circle

30 Generalization Indicates that objects of the specialized class (subclass) are substitutable for objects of the generalized class (super-class). – “is kind of” relationship. Shape {abstract} Circle Super Class Sub Class An abstract class Generalization relationship {abstract} is a tagged value that indicates that the class is abstract. The name of an abstract class should be italicized

31 Generalization A sub-class inherits from its super-class – Attributes – Operations – Relationships A sub-class may – Add attributes and operations – Add relationships – Refine (override) inherited operations A generalization relationship may not be used to model interface implementation.

Summary Identifying classes/Operations/Attributes Associations – Simple associations – Multiplicity – Aggregation – Composition – Generalization