Introduction to Design (and Zen) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These.

Slides:



Advertisements
Similar presentations
Software Design Fundamentals
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
Informática II Prof. Dr. Gustavo Patiño MJ
Design Concepts and Principles
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Introduction to Software Engineering Lecture 7 André van der Hoek.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Software Engineering Tools and Methods Presented by: Mohammad Enamur Rashid( ) Mohammad Rashim Uddin( ) Masud Ur Rahman( )
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Computer Science 240 Principles of Software Design.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
Software Engineering CS B Prof. George Heineman.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
An Object-Oriented Approach to Programming Logic and Design
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.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Computer Science 240 © Ken Rodham 2006 Principles of Software Design.
SOFTWARE DESIGN.
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Drexel University CS 451 Software Engineering Winter Yuanfang Cai Room 104, University Crossings
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Design Concepts and Principles Instructor: Dr. Jerry Gao.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Design Concepts By Deepika Chaudhary.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Object-Oriented Paradigm and UML1 Introduction to the Object- Oriented Paradigm.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Data Abstaraction Chapter 10.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Design Process
Analysis Modeling CpSc 372: Introduction to Software Engineering
Chapter 10, Slide 1 ABSTRACT DATA TYPES Based on the fundamental concept of ABSTRACTION:  process abstraction  data abstraction Both provide:  information.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
CSci 162 Lecture 8 Martin van Bommel. Large-scale Programming Up to now we have been writing relatively short programs to solve simple problem Want to.
Design CS 470 – Software Engineering I Sheldon X. Liang, PH.D.
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.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Design Concepts ch-8
CompSci 280 S Introduction to Software Development
What is an Object Objects are key to understanding object-oriented technology. An object can be considered a "thing" that can perform a set of related.
CSE687 – Object Oriented Design
Lecture 9- Design Concepts and Principles
11.1 The Concept of Abstraction
Software Quality Engineering
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Abstract Data Types and Encapsulation Concepts
Stack ADT & Modularity 2 implementations of the Stack abstract data type: Array Linked List Program design: modularity, abstraction and information hiding.
Abstract Data Types and Encapsulation Concepts
Lecture 9- Design Concepts and Principles
Programming Languages and Paradigms
Presentation transcript:

Introduction to Design (and Zen) 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 What is Design? Requirements Engineering Requirements Engineering Analysi s Model Analysi s Model Design Engineering Design Engineering Design Model Design Model A blueprint for constructing software The most creative part of the development process.

CpSc 372 Where are We Going? Many “levels” of design: Design Model Architectural Design Subsystem Design Subsystem Design Class/Component Design Class/Component Design Method Design Method Design … … GUI Design GUI Design Data Format Design Data Format Design … … Our focus

CpSc 372 A Note on Quality “Quality isn’t something you lay on top of subjects and objects like tinsel on a Christmas tree.” – Robert Pirsig Design work is about making decisions. Each decision influences the quality of the final product. Design tools help us make the decisions that foster quality.

CpSc 372 Your Moment of Zen “This oneness, or the lack of it, is the fundamental quality for anything. Whether it is in a poem, or a man, or a building full of people, or in a forest, or a city, everything that matters stems from it. It embodies everything.” – Christopher Alexander The Quality Without a Name:

Design Concepts CpSc 372: Introduction to Software Engineering Jason O. Hallstrom

CpSc 372 Software Concerns Our analysis model describes a set of concerns associated with the software to be developed. Every concern describes an independent concept, goal, task, or purpose. Data concerns Feature concerns Security concerns Performance concerns etc. A concern is any aspect of the system that can be understood in isolation.

CpSc 372 Levels of Detail Refinement refers to the process of revealing progressively more detail about a particular thing. Software development is a refinement process. Analysis Model Analysis Model Design Model Design Model More Detail As we refine the design model, additional concerns will be revealed.

CpSc 372 Separation of Concerns Separation of concerns refers to our ability to identify and manipulate design concerns independently. Separation of concerns is one of our most important design desiderata. Improved comprehensibility Increased traceability Increased reusability Reduced maintenance effort Results:

CpSc 372 Examples? In our online book store case study, what are some example concerns that should be treated independently?

CpSc 372 Modularity A module is a programming language entity that packages a set of code elements into a reusable unit. In object-oriented languages, the class is the primary unit of modularization. Modules allow us to decompose a complex system into more intellectually manageable pieces. But how should this decomposition be performed?

CpSc 372 Information Hiding Each module should modularize the code associated with a single concern. All design decisions associated with that concern should be hidden from the other modules in the system. This is commonly referred to as information hiding. Information hiding is one of the most important design techniques when designing for change.

CpSc 372 Information Hiding Example Consider the implementation of a basic Stack module. Push element Pop element Access top element Check length Client operations:

CpSc 372 Information Hiding Example (cont’d) Consider the implementation of an abstract data type. An abstract data type defines: A set of abstract values Operations for manipulating those values public interface Stack { void push(Object obj); Object pop(); Object getTop(); int getLength(); } public class StackImpl implements Stack { … }

CpSc 372 Information Hiding Example (cont’d) Now suppose that StackImpl exposes its representation by making its top member public. data top data null Clients of StackImpl can now perform operations on the linked list directly.

CpSc 372 Design for Change? There are at least two major problems with this design decision. What are they?

CpSc 372 Abstraction An abstraction is a cover story that hides details irrelevant to a particular task or concept. mathematical set { 1, 0, 2, 10 } mathematical set { 1, 0, 2, 10 } 1011… class Set { … } +.5v, -.5v, +.5v, +.5v, … “abstracts” “Abstraction is one of the fundamental ways that we as humans cope with complexity.” – Grady Booch

CpSc 372 Modes of Abstraction Procedural abstraction  Focusing on the logical properties of an action  Ignoring the details of the action’s implementation Data abstraction  Focusing on the logical properties of data  Ignoring the details of the data’s representation Class Abstraction  Procedural abstraction + data abstraction Software engineers focus on three primary modes of abstraction.

CpSc 372 Encapsulation Encapsulation and information hiding are often used interchangeably. Encapsulation suggests the existence of a boundary that hides information contained within the boundary. When you encapsulate a design decision, you hide that design decision within a shell.

CpSc 372 Encapsulation and Abstraction Abstractions allow us to think of objects in terms of their logical properties. Encapsulation protects us from irrelevant details, and protects the abstraction represented by each class.

CpSc 372 Breaking Encapsulation Public classes should encapsulate their representations and implementations. Representation = member variables Implementation = method implementations Violating encapsulation has important consequences for objects and their clients.