CS223: Software Engineering Lecture 9: System Modeling.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
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.
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML – Class Diagrams.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
UML Class Diagram and Packages
Unified Modeling (Part I) Overview of UML & Modeling
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Unified Modeling Language
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Chapter 7 System models.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
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.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
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.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
CS212: Object Oriented Analysis and Design Lecture 31: Makefiles.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 Unified Modeling Language, Version 2.0 Chapter 2.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
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.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 5 – System Modeling
Modeling with UML – Class Diagrams
Unified Modeling Language (UML)
COMP 2710 Software Construction Class Diagrams
CS212: Object Oriented Analysis and Design
Main issues: • What do we want to build • How do we write this down
Chapter 5 – System Modeling
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Unified Modeling Language
Class diagram Description
System Modeling Chapter 4
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UML Class Diagram.
Chapter 4 System Modeling.
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

CS223: Software Engineering Lecture 9: System Modeling

Recap Phases in SRS formation Interviewing techniques Requirement change management

Objective After the end of the class students should be able to o Explain the purpose of modelling o Draw UML diagrams  Use-case diagram  Class Diagram

System modeling The process of developing abstract models of a system, with each model presenting a different view or perspective of that system. Means of representing a system using some kind of graphical notation (UML). System modelling helps the analyst to understand the functionality of the system These models are used to communicate with customers.

Why do we need models? Solutions Method: Real Systems may not be available, accessible, affordable … o Represent the System as a Model o Solve problems on the Model o Map the solutions back to the System Human Cognition Mechanism is limited o Short Term & Long Term Memory o Ability to track only up to 7 entities Models are Abstractions that help track complexity

Models we may have seen … Physics o Time-Distance Equation Chemistry o Valency-Bond Structures Mathematics o All about models … Geography o Maps o Projections Electrical Circuits o Kirchoff’s Loop Equations o Time Series Signals & FFT o Transistor Models Building & Bridges o Drawings o Finite Element Models Machine Design o Differential Equations

The Model as an Abstraction of the Reality We are not able to comprehend a complex system in its entirety - a single model is not enough ◦ different perspectives are required, which in turn require different models being independent from each other ◦ each model must exist on different levels of granularity Good models are necessary... ◦ for making complex systems more understandable ◦ for visualizing the essential aspects of a system ◦ for communication among project members and with the customer ◦ for ensuring architectural soundness

Abstraction Several abstractions of the same problem possible: o Focus on some specific aspect and ignore the rest. o Different types of models help understand different aspects of the problem.

Abstraction A map is: An abstract representation.

Abstraction For complex problems: o A single level of abstraction is inadequate. o A hierarchy of abstractions needs to be constructed. Hierarchy of models: o A model in one layer is an abstraction of the lower layer model. o An implementation of the model at the higher layer.

Hierarchical Abstraction Example Suppose you are asked to understand the life forms that inhabit the earth. If you start examining each living organism: o You will almost never complete it. o Also, get thoroughly confused. You can build an abstraction hierarchy.

Living Organisms AnimaliaFungaePlantae Kingdom Mollusca Chordata Ascomycota Zygomycota Homo SapienSolanum Tuberosum Coprinus Comatus Phyllum Species

The Model as an Abstraction of the Reality We are not able to comprehend a complex system in its entirety - a single model is not enough  different perspectives are required, which in turn require different models being independent from each other  each model must exist on different levels of granularity Good models are necessary...  for making complex systems more understandable  for visualizing the essential aspects of a system  for communication among project members and with the customer  for ensuring architectural soundness

What is the UML? Goals Provide users with an expressive modeling language ◦ for the specification, construction, visualization and documentation of the artifacts of a software system ◦ for the construction of different kinds of models ◦ for the exchange of models Provide users with ready-to-use core concepts ◦ however, extensibility and specialization mechanisms are available

UML Goals Provide a formal basis for understanding the modeling language ◦ Meta-model in terms of a UML class diagram ◦ “Semantics” is part of the official UML documentation Support higher-level development concepts ◦ such as collaborations, patterns, and components Integrate best practices

What is the UML not? It is the explicit intention of the UML developers not to prescribe ◦ a certain process ◦ a certain modeling tool ◦ any modeling guidelines ◦ a certain programming language Dedicated Goal: Openness!

Objects – Core to S/W Models Defines object-orientation Has multiple viewpoints o Modeling / Conceptual o Philosophical o Software Engineering o Implementation o Formal Fundamental and most widely used UML model

Objects – Number Example Complex Numbers o Variables  Real Part  Imaginary Part o Operations  Create  Norm  Add / Subtract

Objects – Geometry Examples Points o Variables  X Coordinate  Y Coordinate o Operations  GetX / SetX  GetY / SetY  FindQuadrant Lines o Variables  Point 1  Point 2 o Operations  GetPt1 / SetPt1  GetPt2 / SetPt2  FindLength

Objects – Geometry Examples Triangles o Variables  Point 1  Point 2  Point 3 o Operations  GetPt1 / SetPt1  GetPt2 / SetPt2  GetPt3 / SetPt3  FindPerimeter  FindArea Polygon o Variables  Number of Points  Array of Points o Operations  GetPtCount  GetPt(int i)  FindPerimeter  FindArea

Objects – Library Example 1 Books o Variables  Acc_no  Title  Author  Publisher  Status // Issued, Available  Borrower // Member o Operations  Get  Acc_no, Title, Author, Publisher, Status  Issue(Member)  Return Members o Variables  Member_ID  Name  Address  Books_Issued // Array of Books o Operations  Get  Member_ID, Name, Address, Books_Issued, FreeCards

Objects – Library Example 2 Books o Variables  Acc_no, Title, Author, Publisher, Status o Operations: Get Members o Variables  Member_ID, Name, Address, Count of Books_Issued o Operations: Get Borrow_Register o Variables  Borrow_ID  Acc_no  Member_ID  Borrow_Date  Operator_ID o Operations  Borrow(Books, Members)  Return(Books)

Relations between Objects RelationExample Specialization- Generalization, IS-A Book is-a Publication Journal is-a Periodical Periodical is-a Publication Whole-Part, HAS-ABook has-a Title Book has-a Publisher Publisher has-a Address Member-of, HASLibrary has Member

Relations between Objects IS-A o Class or Type Hierarchy HAS-A o Composition  Uniquely contains the component o Aggregation (called ‘Weak’ Aggregation)  Multiple containments possible Member-of o Special case of HAS-A o Does not support transitivity

Diagrams of UML (1) Use Case Diagram (2) Class Diagram (3) Sequence Diagram (4) Collaboration Diagram (5) Statechart Diagram (6) Activity Diagram (7) Component Diagram (8) Deployment Diagram Implementation Diagrams Interaction Diagrams Behavior Diagrams

Use case modeling Use cases were developed originally to support requirements elicitation and now incorporated into the UML. Each use case represents a discrete task that involves external interaction with a system. Actors in a use case may be people or other systems. Represented diagramatically to provide an overview of the use case and in a more detailed textual form.

Use case diagram What is being described? (The system.) Who interacts with the system? (The actors.) What can the actors do? (The use cases.)

Use Cases A use case describes functionality expected from the system to be developed a use case is triggered either by invocation of an actor or by a trigger event, in short, a trigger A use case is usually represented as an ellipse.

System The set of all use cases together describes the functionality that a software system provides Query student data Issue certificate Announce Exam Student Administration system

Actors It is essential to document who actually works and interacts with the system Actors always interact with the system in the context of their use cases Actors are represented by stick figures

Example

Relationships between Actors Actors often have common properties and some use cases can be used by various actors

Relationships between Use Cases «include» relationships o Use cases that are included as parts of other use cases. o Enable to factor common behavior. «extend» relationships o Use cases that extend the behavior of other core use cases. o Enable to factor variants. Generalizations of use cases o Use cases that are specialized versions of other use cases

Example Base use case Included use case Extending use case Base use case

Condition

Class diagrams They are used when developing an object-oriented system model o To show the classes in a system and the associations between these classes. An object class can be thought of as a general definition of one kind of system object. An association is a link between classes that indicates that there is some relationship between these classes. Objects represent something in the real world o e.g. a patient, a prescription, doctor, etc.

Essential features Class Attributes Operations Relationships o Associations o Generalization o Realization Dependency Constraint Rules and Notes

Class Describes a set of objects having similar: o Attributes (status) o Operations (behavior) o Relationships with other classes Attributes and operations may o have their visibility marked: o "+" for public o "#" for protected o "−" for private o "~" for package

Example Class Name Attributes Operations

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

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

Composition A strong form of aggregation o The whole is the sole owner of its part.  The part object may belong to only one whole o Multiplicity on the whole side must be zero or one. o 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

Generalization Indicates that objects of the specialized class (subclass) are substitutable for objects of the generalized class (super-class). o “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

Thank you Next Lecture: System Modeling