Design Engineering. Dr. Marouane Kessentini Department of Computer Science

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

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

Modelling with Classes. CITS1220 Software Engineering

Overview of Class Diagrams & Examples

DESIGN: ARCHITECTURE AND METHODOLOGY

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

Chapter 5: Structural Modeling

Tutorial notes on. Object relational structural patterns

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

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

Architectural Blueprint

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

Chapter 2: The Object-Oriented Design Process

Object-Oriented Systems Analysis and Design Using UML

Enhanced Entity- Relationship Models (EER)

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

Accessibility. EEC 521: Software Engineering. Classes and Objects. Inheritance. Classes and Objects (OO Analysis)

Goal: build an object-oriented model of the realworld system (or imaginary world) Slicing the soup: OOA vs. OOD

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

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

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

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

CSCU9T4: Managing Information

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

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

Requirements & Domain Models. Lecture 13: Object Oriented Modelling. Nearly anything can be an object. Object Oriented Analysis

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation

SE 1: Software Requirements Specification and Analysis

THE OBJECT-ORIENTED DESIGN PROCESS AND DESIGN AXIOMS (CH -9)

Object-Oriented Systems Development: Using the Unified Modeling Language

Chapter 2. Database Design. Database Systems p. 25/540

OO System Models Static Views

Unified Modeling Language (UML) Class Diagram

OO-Design. Steven R. Bagley

Notation Part 1. Object Orientated Analysis and Design. Benjamin Kenwright

Chapter 6: Entity-Relationship Model

Design and UML Class Diagrams

CS313D: ADVANCED PROGRAMMING LANGUAGE

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

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

1/17/2014. UML Help and Details (from: UML for cse UML for a class. UML and project clarifications

Introducing the UML Eng. Mohammed T. Abo Alroos

SEEM4570 System Design and Implementation Lecture 11 UML

LECTURE 3: SOFTWARE DESIGN. Software Engineering Mike Wooldridge

Object-Oriented Analysis and Design Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology-Kharagpur

Data Process Modeling: Context Diagrams & Data Flow Diagrams (DFDs)

MechEng SE3 Lecture 7 Domain Modelling

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

What are the characteristics of Object Oriented programming language?

UML class diagrams. Nigel Goddard. School of Informatics University of Edinburgh

BBM 102 Introduction to Programming II Spring Inheritance

Software Design Models, Tools & Processes. Lecture 3: Addendum Cecilia Mascolo

CS 15 Design Section. Design

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

Introduction to Unified Modelling Language (UML)

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

Lecture 2 and 3: Fundamental Object-Oriented Concepts Kenneth M. Anderson

CPS122 Lecture: Detailed Design and Implementation

Object- Oriented Design with UML and Java Part I: Fundamentals

University of Calgary Department of Electrical and Computer Engineering. SENG : Object Oriented Analysis and Design Behrouz Homayoun Far

Object-Oriented Design

CS111: PROGRAMMING LANGUAGE II

Computer Science for Engineers

Introduction to Software Engineering. 5. Modeling Objects and Classes

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

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

Chapter 10 Object-Oriented Design Principles

Inheritance and Polymorphism

1: Introduction to Object (1)

Object-Oriented Design

Experiment no 4 Study of Class Diagram in Rational Rose

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

UML Views of a System

Unified Modeling Language (UML) and Modeling

Analysis and Design with UML

Object Oriented Software Development CIS Today: Object Oriented Analysis

Exam in TDDB84: Design Patterns,

Chapter 6: Entity-Relationship Model

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Software Engineering Lab Manual

CS 451 Software Engineering

Object-Oriented Analysis and Design Using UML (OO-226)

Review: Cohesion and Coupling, Mutable, Inheritance Screen Layouts. Object-Oriented Design CRC Cards - UML class diagrams

Relationships. Association Aggregation/Composition Multiplicity Dependencies

Object Relationships

CSSE 220 Day 15. Inheritance. Check out DiscountSubclasses from SVN

06. Analysis Modeling

Unit Wise Questions. Unit-1 Concepts

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

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

A Data Modeling Process. Determining System Requirements. Planning the Project. Specifying Relationships. Specifying Entities

Appendix A - Glossary(of OO software term s)

Object-Oriented Systems Development: Using the Unified Modeling Language

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Object-Oriented Analysis and Design Using UML

Chapter 7: Entity-Relationship Model

SYSPRO s Fluid Interface Design

CMPT 354 Database Systems I

Transcription:

Design Engineering Dr. Marouane Kessentini Department of Computer Science 1

Design Starts mostly from/with requirements (evolving mostly from functionalities and other non functional characteristics) How is the software solution going to be structured? What are the main components (functional comp) Often directly from Requirements Functionalities (use Cases) How are these components related? possibly re organize the components (composition/decomposition) Two main levels of design: Architectural (high level) Detailed design

Relationship between Architecture and Design Detailed Design come from Requirements & Architecture

Detailed Design Further Refine Architecture and match with Requirements How detailed? Maybe of different levels of detail for different views

Functional Decomposition Technique Dates back to structured programming [now (non OO)Web apps with PHP tool] Start with: main (task/requirements) > module Refine into sub modules There are alternative decompositions

Alternative Decomposition/Composition

OO Design First step: Review & Refine use cases Decide Which classes to create How the classes are related Use UML as the Design Language

Essentials of UML Class Diagrams The main symbols shown on class diagrams are: Classes represent the types of data themselves Associations Attributes represent linkages between instances of classes are simple data found in classes and their instances Operations represent the functions performed by the classes and their instances Generalizations group classes into inheritance hierarchies 8

Class Design Classes represent real world entities or system concepts Organized into classes: objects in a class have similar characteristics Classes have properties (attributes or data) Classes also have methods (performs functions) Student dateofbirth : Date name : String getageinyears() : int getageindays() : int

Classes A class is simply represented as a box with the name of the class inside The diagram may also show the attributes and operations The complete signature of an operation is: operationname(parametername: parametertype ): returntype 10

Associations and Multiplicity An association is used to show how two classes are related to each other Symbols indicating multiplicity are shown at each end of the association 11

Labelling associations Each association can be labelled, to make explicit the nature of the association 12

Analyzing and validating Many to one associations A company has many employees, An employee can only work for one company. This company will not store data about the moonlighting activities of employees! A company can have zero employees E.g. a shell company It is not possible to be an employee unless you work for a company Employee * worksfor 1 Company 13

Analyzing and validating associations Many to many An assistant can work for many managers A manager can have many assistants Assistants can work in pools Managers can have a group of assistants Some managers might have zero assistants. Is it possible for an assistant to have, perhaps temporarily, zero managers? Assistant * 1..** supervisor Manager 14

One to one Analyzing and validating associations For each company, there is exactly one board of directors A board is the board of only one company A company must always have a board A board must always be of some company Company 1 1 BoardOfDirectors 15

Analyzing and validating associations Avoid unnecessary one to one associations Avoid this do this 16

Association classes Sometimes, an attribute that concerns two associated classes cannot be placed in either of the classes The following are equivalent 17

Reflexive associations It is possible for an association to connect a class to itself 18

Directionality in associations Associations are by default bi directional It is possible to limit the direction of an association by adding an arrow at one end 19

Generalization Specializing a superclass into two or more subclasses A generalization set is a labeled group of generalizations with a common superclass The label (sometimes called the discriminator) describes the criteria used in the specialization 20

More Advanced Features: Aggregation Aggregations are special associations that represent partwhole relationships. The whole side is often called the assembly or the aggregate This symbol is a shorthand notation association named ispartof 21

When to use an aggregation As a general rule, you can mark an association as an aggregation if the following are true: You can state that the parts are part of the aggregate or the aggregate is composed of the parts When something owns or controls the aggregate, then they also own or control the parts 22

Composition A composition is a strong kind of aggregation if the aggregate is destroyed, then the parts are destroyed as well Two alternatives for addresses 23

Suggested sequence of activities Identify a first set of candidate classes Add associations and attributes Find generalizations List the main responsibilities of each class Decide on specific operations Iterate over the entire process until the model is satisfactory Add or delete classes, associations, attributes, generalizations, responsibilities or operations Identify interfaces Apply design patterns Don t be too disorganized. Don t be too rigid either. 24

A simple technique for discovering classes Look at a source material such as a description of requirements Extract the nouns and noun phrases Eliminate nouns that: are redundant represent instances are vague or highly general not needed in the application 25

Identifying associations and attributes Start with classes you think are most central and important Decide on the clear and obvious data it must contain and its relationships to other classes. Work outwards towards the classes that are less important. Avoid adding many associations and attributes to a class A system is simpler if it manipulates less information 26

Tips about identifying and specifying valid associations An association should exist if a class possesses controls is connected to is related to is a part of has as parts is a member of,or has as members some other class in your model Specify the multiplicity at both ends Label it clearly. 27

Identifying attributes Look for information that must be maintained about each class Several nouns rejected as classes, may now become attributes An attribute should generally contain a simple value E.g. string, number 28

Identifying generalizations and interfaces There are two ways to identify generalizations: bottom up Group together similar classes creating a new superclass top down Look for more general classes first, specialize them if needed Create an interface, instead of a superclass if The classes are very dissimilar except for having a few operations in common One or more of the classes already have their own superclasses Different implementations of the same class might be available 29

Prototyping a class diagram on paper As you identify classes, you write their names on small cards As you identify attributes and responsibilities, you list them on the cards If you cannot fit all the responsibilities on one card: this suggests you should split the class into two related classes. Move the cards around on a whiteboard to arrange them into a class diagram. Draw lines among the cards to represent associations and generalizations. 30

Identifying operations Operations are needed to realize the responsibilities of each class There may be several operations per responsibility The main operations that implement a responsibility are normally declared public Other methods that collaborate to perform the responsibility must be as private as possible 31

Implementing Class Diagrams in Java Attributes are implemented as instance variables Generalizations are implemented using extends Interfaces are implemented using implements Associations are normally implemented using instance variables Divide each two-way association into two one-way associations so each associated class has an instance variable. For a one-way association where the multiplicity at the other end is one or optional declare a variable of that class (a reference) For a one-way association where the multiplicity at the other end is many : use a collection class implementing List, such as Vector 32

Difficulties and Risks when creating class diagrams Modeling is particularly difficult skill Even excellent programmers have difficulty thinking at the appropriate level of abstraction Education traditionally focus more on design and programming than modeling Resolution: Ensure that tem members have adequate training Have experienced modeler as part of the team Review all models thoroughly 33