Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

Visual Basic: An Object Oriented Approach 2 – Designing Software Systems.
Ch 12: Object-Oriented Analysis
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Object-Oriented Analysis and Design
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
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.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 21 Object-Oriented Analysis
© Copyright Eliyahu Brutman Programming Techniques Course.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Analysis Modeling. Class-Based Modeling Identify analysis classes by examining the problem statement Use a “grammatical parse” to isolate potential classes.
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
Object-Oriented Analysis and Design
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Structural Modeling: Class Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800.
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
1 CSc 131 Computer Software Engineering Fall 2012 Lecture # 7 Object-Oriented Design & UML Class Models.
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Class Specifications CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides are intended.
Implementing Specifications CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Unified Modeling Language, Version 2.0
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 Object-oriented and Structured System Models.
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.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 8: Analysis Modeling Software Engineering: A Practitioner’s Approach, 6/e Chapter.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
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.
An Introduction to the Unified Modeling Language
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Structural Modeling Chapter 7. 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Introduction to Design (and Zen) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These.
Analysis Modeling CpSc 372: Introduction to Software Engineering
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Introduction to OOAD and the UML
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Internet and Intranet Protocols and Applications Lecture 5a: HTTP Client-Server Design and Implementation February 15, 2005 Arthur Goldberg Computer Science.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Slide 1 Classes and Objects. Slide 2 Messages and Methods.
1 Unified Modeling Language, Version 2.0 Chapter 2.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
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.
The Software Process CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides are intended.
Representation Invariants CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Slide 1 Objectives Understand the basic characteristics of object-oriented systems. Be familiar with the Unified Modeling Language (UML),V.2.0.
Basic Characteristics of Object-Oriented Systems
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Cmpe 589 Spring 2006.
DATA REQIREMENT ANALYSIS
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
ITEC324 Principle of CS III
Presentation transcript:

Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides are intended to serve as teaching instruments for an undergraduate course in Software Engineering. While the slides were formatted by Dr. Hallstrom, the content is compiled from other sources, including the readings listed on the course website, Dr. Pressman’s Software Engineering textbook, and various internet materials. In almost every case, the ideas belong to someone other than Dr. Hallstrom. Indeed, text is often quoted verbatim without an explicit citation (to improve the readability of the slides). The original authors retain all copyrights. If you are interested in citing any of the material in these slides, please contact Dr. Hallstrom for the original source(s). DO NOT CITE THIS PRESENTATION. THE CONTENT SHOULD NOT BE ATTRIBUTED TO DR. HALLSTROM. SEE DR. HALLSTROM IF YOU HAVE ANY QUESTIONS.

CpSc 372 A Roadmap Use-cases Use-case diagrams Activity diagrams Swimlane diagrams Data object diagrams ERD diagrams Data flow diagrams Process specifications We are going to examine some of the key tools used for creating an analysis model. General Structured AnalysisOO Analysis Class diagrams Packages CRC cards Sequence Diagrams These tools are not specific to either structured analysis or OO analysis.

CpSc 372 A Different View Models analysis classes  Data  Processes Models class collaborations Object-Oriented Analysis Class diagrams Packages CRC cards Sequence diagrams modeled using Modeling Tools: modeled using Object-oriented analysis results in an analysis model that describes a system of collaborating objects. Every object encapsulates a set of data elements, and exports a set of operations for working with those elements.

CpSc 372 What is a Class? Each class is like a template that defines how instances of the class – objects – should be created. A class consists of a set of attributes and methods. A class diagram is used to show the static structure of a class. AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() classes objects Class name Attributes Methods

CpSc 372 Accessibility Attributes and methods can be declared at three levels of visibility. Public (+)  Visible everywhere Private (-)  Visible only from within the declaring class Protected (#)  Visible only from within the declaring class and any of its subclasses We will all now swear never to declare public attributes. class diagram notation

CpSc 372 Inheritance Inheritance allows a subclass to inherit the attributes and methods of a superclass. AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() AnsweringMachineWithTime -time +setTime() AnsweringMachineWithTime -time +setTime() “inherits from” or “specializes” A subclass begins with everything provided by its superclass (or base class). Can add additional attributes and methods Can override existing public/protected methods

CpSc 372 Inheritance Hierarchy An inheritance hierarchy (or class hierarchy) refers to all of the classes in a system, and the inheritance relations among them. Depending on the type of system being developed, the class hierarchy can be complex! /library/en-us/cpref/html/frlrfsystemhierarchy.asp

CpSc 372 Associations Just like data objects, classes can be related to one another. These relationships are called “associations”. AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() AnsweringMachine -greeting -messages +setGreeting() +getMessages() +recordMessage() 1 1 callHandler multiplicity directionname Telephone -phoneNumber +getPhoneNumber() +dialPhone() +answerPhone() Telephone -phoneNumber +getPhoneNumber() +dialPhone() +answerPhone()

CpSc 372 Other Associations Whole PartA PartB Composition Aggregation Defines a whole/part relationship. “…” + with lifetime guarantees. Multiplicity may be specified in either case. Whole PartA PartB

CpSc 372 Identifying Analysis Classes Just like in structured analysis, we begin with a grammatical parse. Nouns  Candidate classes External entities, events, places, structures, things, etc.  Candidate attributes Entities that naturally belong to a class Verbs  Candidate methods Operations that manipulate data Operations that perform a computation Operations that inquire about state Operations that check for a control event

CpSc 372 Building the OOA Model Identify class responsibilities  What are its primary jobs? Identify class relationships and collaborations  What other classes does it need to interact with?  How will they interact? Identify class commonalities and variabilities  Which attributes/methods do they have in common?  Which attributes/methods vary? Use the initial set of analysis classes as the basis for building the OOA model. This will be an iterative process!

CpSc 372 Some Rules of Thumb Focus on the problem  Identify “what” classes/attributes  Ignore “how” classes/attributes Focus on core classes  Eliminate procedural classes  Avoid data classes  Avoid classes with only a single attribute Use (don’t overuse) inheritance  Move commonalities up the hierarchy  Move variabilities down the hierarchy  Avoid deep hierarchies

CpSc 372 Distribution, Cohesion, and Encapsulation Responsibility distribution  Intelligence should be distributed across classes  Avoid monolithic classes Class cohesion  Classes should be single minded  Avoid classes with unrelated members Encapsulation  The class with the data should do the work  Avoid passing state to other classes Some additional model desiderata: This is beginning to look like design work!