Chapter 5: Structural Modeling

Similar documents
Äriprotsesside modelleerimine ja automatiseerimine Loeng 7 Valdkonna mudel

Object-Oriented Systems Analysis and Design Using UML

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

OO System Models Static Views

Object Oriented Software Development CIS Today: Object Oriented Analysis

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram

Topics. Overview- The UML Functional Model. Structural Model. Behavioral Models. Use Case Diagram (essential and system)

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Objectives Pre-Test Questions Introduction Collaboration Diagrams Flow of Events and Special Requirements...

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Basic Structural Modeling. Copyright Joey Paquet,

06. Analysis Modeling

Software Engineering Lab Manual

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

22/09/2012 INFO2110. Copyright Warning. Revision of class diagram. Overview. Purpose of class diagram. Generalization Relationship

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Object-Oriented Software Engineering Practical Software Development using UML and Java

Design Engineering. Dr. Marouane Kessentini Department of Computer Science

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/29/2015

Conceptual Data Modeling by David Haertzen

Introduction to Software Engineering. 5. Modeling Objects and Classes

Chapter 2: The Object-Oriented Design Process

Ch 11 Software Development

Progress Report. Object-Oriented Software Development: Requirements elicitation (ch. 4) and analysis (ch. 5) Object-oriented software development

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

UML: Unified Modeling Language

Outline of Lecture 3. Identifying Objects. Requirements Analysis Overview. Actors, Objects and Classes

Practical UML - A Hands-On Introduction for Developers

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

The Unified Modeling Language. Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL

Introducing the UML Eng. Mohammed T. Abo Alroos

Object-Oriented Design and Modeling Using the UML

Object-Oriented Systems Development: Using the Unified Modeling Language

Course on Database Design Carlo Batini University of Milano Bicocca

COSC 3351 Software Design. An Introduction to UML (I)

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Tutorial notes on. Requirements analysis

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

Practical UML : A Hands-On Introduction for Developers

A Conceptual Model of the UML

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification

UML Tutorial. Unified Modeling Language UML Tutorial

UNIT-II Introduction to UML

History of object-oriented approaches

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

LABORATORY 1 REVISION

Tutorial notes on. Object relational structural patterns

EINDHOVEN UNIVERSITY OF TECHNOLOGY

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Business Modelling. PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e. Early phase of development Inputs: Activities: informal specification

Object-Oriented Design. Module UFC016QM. and Programming. Objects and Classes. O-O Design Unit 2: Faculty of Computing, Engineering

Chapter 10 Object-Oriented Design Principles

Engineering Design w/embedded Systems

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Design and UML Class Diagrams

Object-Oriented Systems Development: Using the Unified Modeling Language

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Chapter 8: Enhanced ER Model

System Analysis & design

Chapter 2: Entity-Relationship Model

Software Service Engineering

Modelling with Classes. CITS1220 Software Engineering

System Analysis and Design/ Object-Oriented System Modeling

Introduction to UML. Danang Wahyu utomo

user.book Page 45 Friday, April 8, :05 AM Part 2 BASIC STRUCTURAL MODELING

Chapter 11 Object and Object- Relational Databases

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak

Suggested answers are provided below. These answers are presented top-down, left to right.

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

2 UML for OOAD. 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML. UML for OOAD Stefan Kluth 1

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

Vidyalankar. T.Y. Diploma : Sem. VI [IF/CM] Object Oriented Modeling and Design Prelim Question Paper Solution

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

Progress Report. Object-Oriented Software Development: Requirements elicitation and analysis. Object-oriented analysis, design, implementation

Object Modeling. Entity-Relationship (ER) diagrams (1976) Object Modelling Technique (OMT) diagrams (1991)

ITEC420: Software Engineering Lecture 3: Recap OO/UML Requirement Workflow

Enhanced Entity-Relationship (EER) Modeling

Object-Oriented Design

Object Oriented Modeling and Design

5 Object Oriented Analysis

CSE 403 Lecture 8. UML Class Diagrams. Thanks to Marty Stepp, Michael Ernst, and other past instructors of CSE 403

Introduction to UML Dr. Rajivkumar S. Mente

Chapter : Analysis Modeling

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

Unified Modeling Language

Introduction to Software Engineering. 5. Modeling Objects and Classes

PART A : MULTIPLE CHOICE Circle the letter of the best answer (1 mark each)

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

UML Is Not a Methodology

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

San José State University Department of Computer Science CS151, Object Oriented Design, Section 04, Fall, 2016 (42968)

UML Views of a System

Unified Modeling Language (UML) Class Diagram


Structural specification

Transcription:

Chapter 5: Structural Modeling

Objectives Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. Understand the processes used to create CRC cards, class diagrams, and object diagrams. Be able to create CRC cards, class diagrams, and object diagrams. Understand the relationship among structural models. Understand the relationship between structural and functional models.

Introduction Functional models represent system behavior Structural models represent system objects and their relationships: People Places Things Create a conceptual model and evolve it into a design model using CRC cards Class diagrams Object diagrams

Structural Models Drawn using an iterative process First drawn in a conceptual, business-centric way Then refined in a technology-centric way describing the actual databases and files More and more detail is added in each iteration Create a vocabulary for analysts & users Allows effective communication between analysts & users

Structural Models Main goal: to discover the key data contained in the problem domain and to build a structural model of the objects Structural Modeling Problem Domain Solution Domain

Classes, Attributes, & Operations Classes Templates for instances of people, places, or things Attributes Properties that describe the state of an instance of a class (an object) Operations Actions or functions that a class can perform

Relationships Describe how classes relate to one another Three basic types in UML Generalization Enables inheritance of attributes and operations Represents relationships that are a-kind-of Aggregation Relates parts to wholes Represents relationships that are a-part-of Association Miscellaneous relationships between classes Usually a weaker form of aggregation

Object Identification Textual analysis of use-case information Nouns suggest classes Verbs suggest operations Creates a rough first cut to provide an object list Brainstorming people offering ideas Initial list of classes (objects) is developed Attributes, operations and relationships to other classes can be assigned in a second round

Object Identification (cont.) Common Object Lists Physical things Incidents Roles Interactions Patterns Useful groupings of collaborating classes that provide solutions to common problems (are reusable) Developed patterns provide a starting point for work in similar domains

CRC Cards Index cards used to document the responsibilities and collaborations of a class Responsibilities Knowing what a class must know manifested as attributes Doing what a class must do manifested later as operations Collaboration Objects working together to service a request: Requestor (client) Responder (server) Bound by a contract

Front-Side of a CRC Card

Back-Side of a CRC Card

CRC Cards & Role-Playing An exercise to help discover additional objects, attributes, relationships & operations Team members perform roles associated with the actors and objects previously identified Utilize activity diagrams to run through the steps in a scenario Identify an important use-case Assign roles based on actors and objects Team members perform each step in the scenario Discover and fix problems until a successful conclusion is reached Repeat for remaining use-cases

Class Diagrams A static model that shows classes and their relationships to one another Elements Classes Objects within the system (a person, place or thing) Stores and manages information in the system and contains: Attributes characteristics of the class Operations activities the class can perform Relationships the associations between classes Depicted as lines between classes Multiplicity indicates how many of one object is/are associated with other objects

Attributes Properties of a class Person: last name, first name, address, etc. Attributes can be derived Preceded with a slash (/) e.g., age is derived from date of birth Visibility of an attribute: Restricts access to attributes to ensure consistency Public attributes (+): visible to all classes Private attributes (-): visible only to an instance of the class in which they are defined Protected attributes (#): visible only to an instance of the class in which they are defined and its descendants

Operations Common operations are not shown Create or delete an instance Return or set a value Types of operations: Constructor creates an object Query makes information about the state of an object available Update changes values of some or all of an object s attributes Destructor deletes or removes an object

Relationships Denotes associations between classes Depicted with a line labeled with the name of the relationship May be directional (depicted with a triangle; e.g., a patient schedules an appointment) Classes may be related to themselves (e.g., employees and managers who may be members of the same class) Multiplicity indicates how many of one class are related to another class

Multiplicities Department 1 1 Boss Exactly one: A department has one and only one boss Employee 1 0..* Child Zero or more: An employee has zero to many children Boss 1 1..* Employee One or more: A boss is responsible for one or more employees

Association Classes Common in many-to-many relationships Used when attributes about the relationship between two classes needs to be recorded Students are related to courses; a Grade class provides an attribute to describe this relationship Illnesses are related to symptoms; a Treatment class provides an attribute to describe this relationship

Generalization & Aggregation Associations Generalization denotes inheritance Properties and operations of the superclass are valid for the sub-class Depicted as a solid line with a hollow arrow pointing at the superclass Aggregation denotes a logical a-part-of relationship Composition denotes a physical a-part-of relationship

Sample Class Diagram

Simplifying Class Diagrams Fully populated class diagrams of real-world system can be difficult to understand Common ways of simplifying class diagrams: Show only concrete classes The view mechanism shows a subset of classes Packages show aggregations of classes (or any elements in UML)

Object Diagrams Class diagrams with instantiated classes Example: instead of a Doctor class, create an actual doctor, say Dr. Smith Place values into each attribute Used to discover additional attributes, relationships and/or operations or those that are misplaced

Example Object Diagram

7 Steps to Structural Models 1. Create CRC Cards 2. Review CRC Cards & identify missing objects, attributes, operations and/or relationships 3. Role-play the CRC cards look for breakdowns & correct; create new cards as necessary 4. Create the class diagram 5. Review the class diagram remove unnecessary classes, attributes, operations and/or relationships 6. Incorporate patterns 7. Review and validate the model

Verifying & Validating the Model Analyst presents to developers & users Walks through the model Provides explanations & reasoning behind each class Rules 1. Each CRC card is associated with a class 2. Responsibilities on the front of the card are included as operations on the class diagram 3. Collaborators on the front of the card imply a relationship on the back of the card 4. Attributes on the back of the card are listed as attributes on the class diagram

Rules for Validating & Verifying the Model (cont.) 5. Attributes on the back of the CRC card each have a data type (e.g., salary implies a number format) 6. Relationships on the back of the card must be properly depicted on the class diagram a) Aggregation/Association b) Multiplicity 7. Association classes are used only to include attributes that describe a relationship

Summary Structural Models CRC Cards Class Diagrams Creating CRC Cards and Class Diagrams