Structural Modeling.

Slides:



Advertisements
Similar presentations
Systems Analysis and Design with UML Version 2.0, Second Edition
Advertisements

Object-oriented modeling Class/Object Diagrams
Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.
2/9/98 Thomas O’Reilly 1 A Quick UML Introduction.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
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.
Structural Modeling Chapter 7
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Object oriented classification Classification is the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
UML for OOADStefan Kluth 1 2UML for OOAD 2.1What is UML? 2.2Classes in UML 2.3Relations in UML 2.4Static and Dynamic Design with UML.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
Lecture 6: Structural Modeling
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
1 Structural Modeling Chapter 7. 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
CSE 403, Spring 2007, Alverson Using UML to express Software Architecture.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
PowerPoint Presentation for Dennis, Wixom & Tegardem Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
1 Introduction to Classes. 2 Terms and Concepts A class is... –The most important building block of any object- oriented system. –A description of a set.
Class diagrams Terézia Mézešová.
Structural Modeling. Introduction A Structural model is a formal way of representating the objects that are used and created by a business system One.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.
CHAPTER
UML Diagrams: Class Diagrams The Static Analysis Model
Business System Development
Chapter 5: Structural Modeling
Object-Oriented Analysis and Design
Class Diagrams.
EKT472: Object Oriented Programming
Analysis and Design with UML: Discovering Classes and Relationships
Class diagram Description
Analysis and Design with UML: Discovering Classes and Relationships
Analysis and Design with UML: Discovering Classes and Relationships
UML Diagrams: The Static Model Class Diagrams
Object Oriented Analysis and Design
Domain Class Diagram Chapter 4 Part 2 pp
Software Engineering Lecture #11.
INFS 6225 Object Oriented Systems Analysis & Design
Software Engineering System Modeling Extra examples Dr.Doaa Sami
Business Analysis More on Classes Chris Russell O2.41
Copyright 2007 Oxford Consulting, Ltd
Analysis and Design with UML: Classes and Relationships
Class Diagram.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Final and Abstract Classes
Object Oriented System Design Class Diagrams
2 UML for OOAD 2.1 What is UML? 2.2 Classes in UML
From Class Diagram to Contract Diagram
Presentation transcript:

Structural Modeling

Objectives Define the purpose of structural models

Structural Models: Introduction Use-case and activities describe how a system behaves Structural models describe a static view of The data stored in a system The interface describing how that data is accessed Structural models ultimately become class diagrams This data and interface together form a class We are back to OOP

Classes and their Members A class is a template or blueprint for an object It’s attributes store data It’s operations (method) act on the data Triggers are a special form of method Responsibilities

Class Relationships Some classes have relationships to each other They fall into 3 categories Generalization Aggregation Association

Generalization We again talk about an “IS-A” relationship Your book calls it a “a kind of” relationship We inherit attributes and methods from other classes The inherited class is called the base class or super class The inheriting class is called the derived class or subclass

Aggregation Aggregation relates to “the parts of a whole” X is a part of Y A transmission is part of a car An engine is part of a car The inverse of aggregation is decomposition An engine can be part of other things than a car

Association You saw association related to use-case diagrams Associations between classes are more loosely defined than generalization and aggregation A professor writes a book

The Process of Identifying Objects So how do we figure out how to structure classes, their attributes and their methods? What are the relationships between classes? There are a few common techniques to do this Textual analysis Brainstorming Use-case narratives and diagrams CRC cards

Identifying Objects: Textual Analysis Review use-case diagrams and text in use-case descriptions based on the following rules Common nouns imply a class objects Adjectives imply attributes A doing verb implies an operation (method) A transitive verb implies an operation A doable activity with a direct object A having verb implies an aggregation or association relationship

Identifying Objects: Other Brainstorming is designed to think up new and non-obvious ideas Common object lists Lists of objects belonging to a particular category

CRC Cards Class-Responsibility-Collaboration diagram They provide a rough cut analysis of a class interface

CRC Card: Example

CRC Card: Parts Header Class name Description Type (concrete or abstract) Associated use-cases (optional)

CRC Card: Parts A two-column layout of responsibilities and collaborators Responsibilities Collaborators CreatePurchaseOrder Vendor / Material EditPurchaseOrder CancelOrder Vendor ApprovePurchaseOrder ReceiveGoods Material PayVendor Vendor / AccountsPayable

CRC Card: Parts Lists of attributes and relationships Attributes PurchaseOrderID PurchaseOrderAmount Vendor Relationships Type Generalization Order Aggregation OrderItem ShippingInstructions

Class Diagrams From the CRC cards, we can create more formal class diagrams They depict Classes having attributes and methods Relationships between classes Cardinality

Class Diagrams: Members A class diagram lists the class name, attributes and operations in sections Attributes appear as name: type Methods appear as name(parameter list)

Class Diagrams: Inheritance Drawn a line from the derived class to the base class Abstract members appear in italics

Class Diagrams: Interfaces An interface is a contract and classes implement interfaces Depict with dotted lines instead of solid lines

Class Diagram: Association A general bi-directional link between classes Both classes are aware of each other

Class Diagram: Aggregation Remember that aggregation is a special type of association used to model the whole to its parts Basic aggregation depicted with a hollow diamond The child instance can outlive the parent instance Composition depicted with a filled diamond The child instance cannot outlive the parent instance

Relationships: Multiplicity Relationships also have multiplicity How object instances are related to other object instance Symbol Meaning 1 Attribute has a single value 0..1 Attribute can be null * A collection of values 1..* A collection containing at least one value n..m A collection containing between n and m values

Visibility Object-oriented program supports a notion of visibility Mark Visibility Description + Public Visible by other classes and packages # Protected Visible to derived types - Private Visible only to the owner type ~ Package Visible to other types in the same package

Refactoring This whole process is iterative And we refine how classes are organized and their attributes