Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
Advertisements

4. Object-Oriented Programming Procedural programming Structs and objects Object-oriented programming Concepts and terminology Related keywords.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Lecture 12 – ADTs and Stacks.  Modularity  Divide the program into smaller parts  Advantages  Keeps the complexity managable  Isolates errors (parts.
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
Concepts of Systems Theory
Chapter 3 Data Abstraction: The Walls. © 2005 Pearson Addison-Wesley. All rights reserved3-2 Abstract Data Types Modularity –Keeps the complexity of a.
Overview. Why data structures is a key course Main points from syllabus Survey Warmup program And now to get started...
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 1 Principles of Programming and Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Data Abstraction: The Walls
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
C++ fundamentals.
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.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
CSE 303 – Software Design and Architecture
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Succeeding as a Systems Analyst 2.1 Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
1 Life Cycle of Software Specification Design –Risk Analysis –Verification Coding Testing –Refining –Production Maintenance.
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.
Design Concepts By Deepika Chaudhary.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
Chapter 4 Data Abstraction: The Walls. © 2004 Pearson Addison-Wesley. All rights reserved4-2 Abstract Data Types Modularity –Keeps the complexity of a.
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.
Learners Support Publications Object Oriented Programming.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Introduction to Design. 2 Outline Basics of design Design approaches.
Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Chapter 1 Data Abstraction: The Walls CS Data Structures Mehmet H Gunes Modified from authors’ slides.
Chapter 2 Principles of Programming and Software Engineering.
Principles of Programming. Achieving an Object-Oriented Design  Abstraction and Information Hiding  Object-Oriented Design  Functional Decomposition.
Advanced Data Structures Lecture 1
Principles of Programming & Software Engineering
Software Design.
7. Modular and structured design
CompSci 280 S Introduction to Software Development
Data Abstraction: The Walls
Coupling and Cohesion Rajni Bhalla.
CHAPTER 5 GENERAL OOP CONCEPTS.
Chapter 2 Succeeding as a Systems Analyst
Data Abstraction: The Walls
Chapter 1 Data Abstraction: The Walls
Principles of Programming and Software Engineering
Software Design Mr. Manoj Kumar Kar.
Figure 1.1 The life cycle of software as a water wheel that can rotate from one phase to any of phase.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
SOFTWARE DESIGN AND ARCHITECTURE
Chapter 1 The Systems Development Environment
Software Modules in Software Design
Figure 1.1 The life cycle of software as a water wheel that can rotate from one phase to any of phase.
Divide and Conquer Methodology
Subprograms and Programmer Defined Data Type
On the Criteria To Be Used in Decomposing Systems into Modules
On the Criteria To Be Used in Decomposing Systems into Modules D. L
Introduction to Systems Analysis and Design Stefano Moshi Memorial University College System Analysis & Design BIT
Introduction to Object-Oriented Programming
Chapter 2. Problem Solving and Software Engineering
Presentation transcript:

Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is done by: Identifying the objects in the problem Identifying what actions can be performed on objects, and Determining how the objects interact with each other

Modular Design: Decomposition Simplify a complex problem by dividing it into smaller, simpler parts (modules) Modules should be loosely coupled and Highly cohesive The purpose, inputs and outputs of each module and methods should be specified This specification should not include a description of the implementation Different programmers can work on different modules

Modular Design: Abstraction Abstraction separates the purpose of a module from its implementation The implementation details are ignored (or suppressed) to concentrate on the purpose of a module Procedural abstraction Separates the purpose of a method from its implementation Can be specified in pre and post conditions Data abstraction Specifies what can be done to data in a data collection, not how the data is stored or how it is done A collection of data specified in this way is called an abstract data type (ADT)

Procedural Abstraction Figure 2-2 The details of the sorting algorithm are hidden from other parts of the solution.

Modular Design: Encapsulation A decomposition technique where a complex object is decomposed into modules which have a separate and distinct purpose i.e. highly cohesive Because a module is a complete entity with one purpose it can be re- used in another application This allows each module to be relatively independent from the others i.e. the modules are loosely coupled This also makes it easy for different people to work on different modules at the same time Because modules are independent their inner details can be hidden from each other Referred to as information hiding To use a module one is only required to learn its interface, rather than its entire implementation

Modular design (summary) Decomposition: dividing modules to smaller simpler submodules Abstraction: separation of the purpose of module from details (implementation) Encapsulation: packing related data together, providing interface to data, while hiding actual data Note: The last two items and information hiding are highly- related concepts (can be easily confused). For details see:

Advantages of modular design Helps to implement large programs Isolates errors: helps in debugging Easy to read Easy to modify (changes are localized in few modules)