1 CSE1301 Computer Programming Lecture 25: Software Engineering.

Slides:



Advertisements
Similar presentations
Structured Design. 2 Design Quality – Simplicity “There are two ways of constructing a software design: One is to make it so simple that there are obviously.
Advertisements

1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
High Quality Code Why it matters. By Ryan Ruzich.
OBJECT-ORIENTED THINKING CHAPTER Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity.
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
Copyright Irwin/McGraw-Hill Software Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
1 CSE1301 Computer Programming: Lecture 23 Algorithm Design (Part 1)
CSCE 121, Sec 200, 507, 508 Software Engineering Fall 2010 Prof. Jennifer L. Welch.
1 CSE1301 Computer Programming Lecture 26: Case Study.
Designing the system Conceptual design and technical design
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
CSE1301 Computer Programming: Lecture 28 Transaction Processing.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
1 CSE1301 Computer Programming Lecture 12 Algorithm Design.
Chapter 1 Principles of Programming and Software Engineering.
CSE1301 Computer Programming: Lecture 21 Software Engineering.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
1 CSE1301 Computer Programming Lecture 12: Algorithm Design.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 CSE1301 Computer Programming: Lecture 25 Software Engineering 2.
CSE1301 Computer Programming: Lecture 29 Group Project: “Quabble”
CSE1301 Computer Programming: Lecture 16 Algorithm Design: Components.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 02.
SDLC: System Development Life Cycle Dr. Bilal IS 582 Spring 2006.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
INTRODUCTION TO PROGRAMMING STRUCTURE Chapter 4 1.
SDLC: System Development Life Cycle Dr. Dania Bilal IS 582 Spring 2007.
Program Design Simple Program Design Third Edition A Step-by-Step Approach 9.
Modularity Lecture 4 Course Name: High Level Programming Language Year : 2010.
SE: CHAPTER 7 Writing The Program
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Cohesion and Coupling CS 4311
Chapter 7 Software Engineering. © 2005 Pearson Addison-Wesley. All rights reserved 7-2 Chapter 7: Software Engineering 7.1 The Software Engineering Discipline.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 10 Slide 1 Chapter 13 Finalizing Design Specifications.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
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.
1 CSE1301 Computer Programming Lecture 24: Software Engineering.
Algorithms and Programming Functions Lecture 28. Summary of Previous Lecture while statement for statement break statement Nested loops.
Chapter 3 Top-Down Design with Functions Part II J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
© 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.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Computing Higher – SD Unit - Topic 8 – Procedure and Standard Algorithms P Lynch, St Andrew’s High School Unit 2 Software Development Process Topic.
Design and Planning Or: What’s the next thing we should do for our project?
Chapter 16 Quality Assurance Through Software Engineering Systems Analysis and Design Kendall & Kendall Sixth Edition.
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
Systems Design.  Application Design  User Interface Design  Database Design.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To design and implement programs with more than one function ❏ To be able to.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
Basic Characteristics of Object-Oriented Systems
Programming Logic and Design Fifth Edition, Comprehensive Chapter 7 Using Methods.
Programming Logic and Design Seventh Edition
Coupling and Cohesion Rajni Bhalla.
Basic Concepts in Software Design
Coupling and Cohesion 1.
System Design and Modeling
Basic Concepts in Software Design
Software Design Mr. Manoj Kumar Kar.
Improving the Design “Can the design be better?”
Software Engineering Lecture #8.
Chapter 7 Software Engineering.
Presentation transcript:

1 CSE1301 Computer Programming Lecture 25: Software Engineering

2 Topics Software Engineering Structure charts Structured design –Modularity –Coupling –Cohesion

3 Software Engineering Structured development of software systems –Examples: software for banking, stock exchange, space probe control, toll charge, operating system, games Tools and Techniques –Structured process rather than trial-and-error –Important goal: eliminate errors “Engineering” –Zero tolerance to error –Pre-fabricated components –Re-usable components

4 Tasks –project planning –project management –documentation –prototyping and simulation –interface design –programming –testing Computer-Aided Software Engineering (CASE) Tools Software Engineering (cont)

5 Components of the Software Development Process  Define the problem clearly  Analyze the problem  Design an algorithm  top-down / bottom-up design  Document the system  Code (Implement) the algorithm  Test the code Recall:

6 Development Approach: Water-Fall Model (Old) AnalysisDesignImplementTest Requires that each stage be completed before beginning next stage

7 Development Approach: Incremental Model AnalysisDesignImplementTest Increments from simplified version with limited functionality to complete system At each stage: prototype

8 Prototyping Construction of simplified version of parts of the proposed system that can be analyzed before further development Types of items that can be prototyped: –screen and report format, etc Note: different concept to `function prototype’ in C

9 Modularity Top-down analysis and design Break problem down into manageable sub-problems

10 Modularity Top-down analysis and design Break problem down into manageable sub-problems

11 Golden Rule #1 Design Top-Down, but always build Bottom-Up Code and test the simplest components first Test each component before using it to build more complex components

12 Structure Chart Pictorial representation of a modular structure –each function/module represented by a rectangle –arrows represent dependencies between them

13 Coupling Links and dependencies between functions Control coupling: –when one function passes control to another –Examples: function call, return Data coupling: –sharing of data between functions –Examples: function parameters, return values

14 Example 1 Structure chart with labels showing data coupling inviteToParty ( name, date, venue ) { ringUp ( name ) askToParty (date, venue ) sayGoodbye ( name ) } askToPartysayGoodbyeringUp inviteToParty name date venue name date venue control coupling data coupling

15 searchAddrBook ringUp ( name ) { set number to result of searchAddrBook ( name ) pick up the phone dial number say “Hello name, it’s Jim” } Example 2 Structure chart with labels showing data coupling ringUp etc... name number name return value (or data modified using pointers)

16 Notes on Coupling Aim: maximize module independence = minimize coupling Use of global variables (not constants) is a form of implicit data coupling: dangerous! –It is NOT recommended to have global variables in your program

17 Notes on Coupling (cont) How is control coupling represented in code? –Function call: When a function is called, control is passed to that function –Function return: When the code in a function has been executed, control is returned to the code that called the function How is data coupling represented in code? –Data sent to a function via parameters –Data returned from function using “return” –Data modified by pointers

18 Cohesion Cohesion: refers to how closely related the function’s internal parts are Logical cohesion (weak) –Internal elements perform activities that are logically similar, e.g., I/O function Functional cohesion (strong) –all parts are geared towards a single activity Aim: high intra-module cohesion

19 Example 1 contact ( company, message, mode ) { if mode is by fax { sendFax ( company, message) } else if mode is by { send ( company, message) } Cohesive

20 Example 2 Not cohesive contact ( company, message, mode ) { if mode is by fax { sendFax ( company, message) } else if mode is by { send ( company, message) } printAddressBook ( ) }

21 Golden Rule #2 Modules in a well-structured program are highly cohesive and loosely coupled The size of the data coupling corresponds roughly to the level of the module in the hierarchy

22 Summary Modularity is crucial for developing large software projects Structure charts are a useful design tool Design top-down, but build bottom-up Build incrementally with prototypes Well-structured programs are highly cohesive, and loosely coupled

23 Reading Brookshear: Chapter 6 King: Section 19.1