Software Engineering System Modeling Extra examples Dr.Doaa Sami

Slides:



Advertisements
Similar presentations
Object-Oriented Programming Basics Prof. Ankur Teredesai, Computer Science Department, RIT.
Advertisements

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.
CSCI 143 OOP – Inheritance 1. What is Inheritance? A form of software reuse Create a new class from an existing class – Absorb existing class data and.
UML Class Diagram and Packages
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.
Computer Science I Inheritance Professor Evan Korth New York University.
OBJECT ORIENTED PROGRAMMING LECTURE 12 Instructor: Rashi Garg Coordinator: Gaurav Saxena.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Computer Science [3] Java Programming II - Laboratory Course Lab 1 + 2: Review inheritance & abstract Review inheritance & abstractPolymorphism Faculty.
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.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
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.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
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.
Peyman Dodangeh Sharif University of Technology Fall 2014.
Chapter 5 System Modeling Sommerville, "software engineering ", 9 th Ed., 2011.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object Oriented Analysis and Design Class and Object Diagrams.
CSE 403, Spring 2007, Alverson Using UML to express Software Architecture.
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.
1 CSC241: Object Oriented Programming Lecture No 17.
Basic ER modeling was adequate for simpler databases, but in the 1980’s more demanding databases required more extensive modeling requirements. Some such.
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.
Unified Modeling Language (UML)
CS 350 – Software Design UML – The Unified Modeling Language – Chapter 2 The Unified Modeling Language is a visual language used to create models of programs.
COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Entity Relationship (E-R) Model
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Advanced Programming in Java
Modern Programming Tools And Techniques-I
Unified Modeling Language (UML)
COMP 2710 Software Construction Class Diagrams
Structural Modeling.
Lecture 12 Inheritance.
Visit for more Learning Resources
Object-Oriented Programming Basics
Objects as a programming concept
Class Diagrams.
Class diagram Description
Advanced Programming in Java
Week 4 Object-Oriented Programming (1): Inheritance
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
An Introduction to Inheritance
Road Map Inheritance Class hierarchy Overriding methods Constructors
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
ATS Application Programming: Java Programming
OO Domain Modeling With UML Class Diagrams and CRC Cards
Object Oriented Analysis and Design
Domain Class Diagram Chapter 4 Part 2 pp
Software Engineering Lecture #11.
MSIS 670 Object-Oriented Software Engineering
UML Class Diagram.
Software Engineering Lecture 10.
Advanced Programming Behnam Hatami Fall 2017.
Unified Modelling Language
Understand and Use Object Oriented Methods
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
Class Diagram.
CMSC202 Computer Science II for Majors Lecture 10 and 11 – Inheritance
Object-Oriented PHP (1)
Information System Design
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Computer Science II for Majors
Presentation transcript:

Software Engineering System Modeling Extra examples Dr.Doaa Sami Modified from Sommerville’s originals

2 C. Structural Models

3 1. C l a s s D i a g r a m

attribute values +getlength(): double Class Attributes 7  Visibility name : type [count] = default_value  underline static attributes. Student  Visibility -name: string  +  public - totalStudent:int #  protected + getName(): string  -  private + getTotalStuden()t:int  /  derived  derived attribute: not stored, -length: double -width:double attribute values +getlength(): double +getArea(): double - salary: double + getSalary(): double Rectangle /area:double but can be computed from other +getWidth():double

 Visibility -name: string Class Operations 8  Visibility name (parameters) : return_type  underline static operations. Student  Visibility -name: string  +  public - totalStudent:int  # protected + getName(): string  -  private + getTotalStuden()t:int return_type is omitted if function is: Rectangle  constructor -length: double  void -width:double +getlength(): double +getWidth():double +getArea():double - salary: double + getSalary(): double /area:double

Relationships 9  There are two kinds of Relationships  Association (student enrolls in course).  Generalization (parent-child relationship).  Associations can be further classified as  Aggregation.  Composition.

Association  Associations denote relationships between classes. 10  Associations denote relationships between classes.  Describe the nature of the relationship.  Example:  Student enrolls into course  Course enrolled by a student. Student Course Enrolls

Multiplicity relates to ONE instance of another class. 11  Multiplicity is the number of instances one class relates to ONE instance of another class.  For each association, there are two multiplicity decisions to make, one for each end of the association.  For each instance of Professor, many Sections may be taught.  For each instance of Section, there may be either one or zero Professor as the instructor. Professor Section -name:string 0..1 has 0..* -section#:int +getName():string +getSection#:int

Multiplicity (C++ Implementation) 12 Professor Section -name:string 0..1 has 0..* -section#:int +getName():string +getSection#:int class Professor{ class Section{ // A list of Sections // Proffessor Section sec[4]; Professor prof; string name; int sectionNum; Public: Public: string getName(); int getSectionNum(); }; } ;

Multiplicity Representation 13

Aggregation models a whole-part relationship between an 14 Association is used when both of the involved classes are equaly important.  Aggregation is a special form of association that models a whole-part relationship between an aggregate (the whole) and its parts.  Aggregation shows how classes that are collections are composed of other classes.  Aggregation is a part-of relationship. Car 1 4 Wheel

Composition 15  Composition is a strong form of aggregation.  Aggregation is used to model a whole-part relationship between an aggregate (whole) and its parts.  Composition is a strong form of aggregation.  The whole is the only owner of its part.  Multiplicity on the whole side must be one.  The lifetime of the part is dependent upon the whole.  When Circle is destroyed, Point is also destroyed.  The composite must manage the creation and destruction of its parts.

Composition (C++ Implementation) 16 Restaurant 1 1 Menu class Restaurant{ class Menu{ .... }; Menu m; }; ....

Generalization Cows and Wolfs are Mammals. 17 Rather than learn the detailed characteristics of every entity that we experience, we place these entities in more general classes (animals, cars, houses, etc.) and learn characteristics of these classes.  This allows us to infer that different members of these classes have some common characteristics e.g. Cows and Wolfs are Mammals.

Generalization Cont. 18  In object-oriented languages, generalization is implemented using class inheritance mechanisms.  In a generalization, the attributes and operations associated with higher-level classes (super classes) are also associated with the lower-level classes (sub classes).  Subclasses are inherit the attributes and operations from their Superclasses and then add more specific attributes and operations.

Generalization 19

Association Class association connection to have operations and 20  An association class is a construct that allows an association connection to have operations and attributes.  It used when you need to include another class because it includes valuable information about the relationship.

Example: Information System for School 21