Software Design and Architecture

Slides:



Advertisements
Similar presentations
Software Architecture Design Chapter 12 Part of Design Analysis Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Advertisements

Lecture 6: Software Design (Part I)
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Chapter 11 Component-Level Design
Unified Modeling Language
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
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.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Object-Oriented Metrics
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Object-Orientated Design Unit 3: Objects and Classes Jin Sa.
CS 2511 Fall Features of Object Oriented Technology  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance.
Data Abstraction: The Walls
Computer Science 240 Principles of Software Design.
Introduction to Object-oriented programming and software development Lecture 1.
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.
Object-Oriented Design Principles and Patterns. © 2005, James R. Vallino2 How Do You Design? What principles guide you when you create a design? What.
1 Life Cycle of Software Specification Design –Risk Analysis –Verification Coding Testing –Refining –Production Maintenance.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
7-1 © Prentice Hall, 2004 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
Abstraction CMPS Abstraction Abstraction mechanisms are techniques to deal with creating, understanding and managing complex systems Abstraction.
Abstraction ADTs, Information Hiding and Encapsulation.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
1 Introduction to Classes. 2 Terms and Concepts A class is... –The most important building block of any object- oriented system. –A description of a set.
Class diagrams Terézia Mézešová.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
04 - OOD Intro.CSC4071 Software Design ‘Requirements’ defines –The goals the system needs to satisfy. ‘Specification’ defines –The externally-observable.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
CSE 2341 Object Oriented Programming with C++ Note Set #4
Basic Characteristics of Object-Oriented Systems
Chapter 11 An introduction to object-oriented design.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.
Design Concepts ch-8
CompSci 280 S Introduction to Software Development
Cmpe 589 Spring 2006.
Object-Oriented Modeling
Object-Oriented Analysis and Design
For University Use Only
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
SOFTWARE DESIGN AND ARCHITECTURE
Advanced Java Programming
CSC 205 – Java Programming II
CSC 205 Programming II Lecture 2 Subclassing.
Component-Level Design
Software Engineering Lecture #11.
تحليل انظمة و تصميمها الوحدة الخامسة أ.محمد زكي شبير.
CS223: Software Engineering
SYS466 Domain Classes – Part 1.
Understand and Use Object Oriented Methods
Software Design Lecture : 8
Object Oriented Practices
Copyright 2007 Oxford Consulting, Ltd
Software Analysis.
Object Oriented Analysis and Design
Chapter 2. Problem Solving and Software Engineering
2.1 Introduction to Object-Oriented Programming
CMPE 135 Object-Oriented Analysis and Design March 7 Class Meeting
The Object Paradigm Classes – Templates for creating objects
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
From Use Cases to Implementation
Presentation transcript:

Software Design and Architecture Lecture #3

CRC For conceptual design Components Responsibilities Collaborators

Class diagrams for technical design

Class from code

Encapsulation and access modifiers

Decomposition Three types of relationship in decomposition Association Aggregation Composition

Association

Aggregation(Weak “has-a”)

Composition(strong “has-a”)

Generalization Generalization helps reduce redundancy when solving problems. In coding, algorithmic behaviors are often modelled through methods object-oriented modelling achieves generalization by classes through inheritance

Generalization with inheritance

Inheritance

Generalization with interfaces

Coupling Coupling focuses on complexity between a module and other modules If a module is too reliant on other module(s) it is “tightly coupled” other wise “loosley coupled”. Metrics to consider for coupling are Degree(Number of connections to other modules) Ease (How obvious are the connections?) Flexibility(replaceable modules without effecting each other)

Cohesion Cohesion focuses on complexity within a module, and represents the clarity of the responsibilities of a module A module that performs one task and nothing else, or that has a clear purpose, has high cohesion. if a module encapsulates more than one purpose, if an encapsulation has to be broken to understand a method, or if the module has an unclear purpose, it has low cohesion

High or Low cohesion?

Separation of concerns Abstraction occurs as each concept in the problem space is separated with its own relevant attributes and behaviors. Encapsulation occurs as the attributes and behaviors are gathered together into their own section of code called a class. Access to the class from the rest of the system and its implementation are separated, so details of implementation can change while the view through an interface can stay the same. Decomposition occurs as a whole class can be separated into multiple classes. Generalization occurs as commonalities are recognized, and subsequently separated and generalized into a superclass.

Example public class SmartPhone { } private byte camera; private byte phone; public SmartPhone() { … } public void takePhoto() { … } public void savePhoto() { … } public void cameraFlash() { … } public void makePhoneCall() { … } public void encryptOutgoingSound() { … } public void decipherIncomingSound() { … } }

public class SmartPhone { private ICamera myCamera; private IPhone myPhone; public SmartPhone( ICamera aCamera, IPhone aPhone ) { this.myCamera = aCamera; this.myPhone = aPhone; } public void useCamera() { return this.myCamera.takePhoto(); public void usePhone() { return this.myPhone.makePhoneCall();

Information hiding Access Modifiers Public Private Default Protected