1 CSE1301 Computer Programming Lecture 24: Software Engineering.

Slides:



Advertisements
Similar presentations
Chapter 10: The Traditional Approach to Design
Advertisements

Chapter 3: Modules, Hierarchy Charts, and Documentation
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.
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Traditional Approach to Design
Chapter 10 The Traditional Approach to Design
Chapter 9: The Traditional Approach to Design Chapter 10 Systems Analysis and Design in a Changing World, 3 rd Edition.
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)
1 CSE1301 Computer Programming Lecture 25: Software Engineering.
CS 201 Functions Debzani Deb.
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.
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 25 Software Engineering 2.
CSE1301 Computer Programming: Revision. Topics Type of questions What do you need to know? About the exam Exam technique Sample questions.
CSE1301 Computer Programming: Lecture 29 Group Project: “Quabble”
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Chapter.
1 CSE1301 Computer Programming: Lecture 25 Group Project: "Hunt the Wumpus”
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 02.
INFO415 Approaches to System Development: Part 2
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.
1 CSE1301 Computer Programming: Revision. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Revision.
University of Toronto Department of Computer Science CSC444 Lec05- 1 Lecture 5: Decomposition and Abstraction Decomposition When to decompose Identifying.
10 ITK261 The traditional approach to design Reading: Chapter 10 Oct 9, 11.
Modularity Lecture 4 Course Name: High Level Programming Language Year : 2010.
Introduction to Computer Programming Using C Session 23 - Review.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
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.
Programming Logic and Design Using Methods. 2 Objectives Review how to use a simple method with local variables and constants Create a method that requires.
1 CSE1301 Computer Programming: Revision. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Revision.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
Information System Design (IT60105) Lecture 26 Object-Oriented System Testing.
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.
Chapter 3 Top-Down Design with Functions Part II J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
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.
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: Where are we now in the CSE1301 syllabus?
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.
ITEC 4010: Systems Analysis and Design II. Lecture 3 System Development Part II Review Professor Peter Khaiter.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Software Engineering Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 7: Software Engineering
Tools Of Structured Analysis
Coupling and Cohesion Rajni Bhalla.
System Design and Modeling
Software Design Mr. Manoj Kumar Kar.
FORMAL SYSTEM DEVELOPMENT METHODOLOGIES
Cohesion and Coupling Chapter 5, Pfleeger 01/01/10.
Improving the Design “Can the design be better?”
Chapter 7 Software Engineering.
Presentation transcript:

1 CSE1301 Computer Programming Lecture 24: Software Engineering

2 Topics Thus far in CSE1301 Tools and techniques –Structure Charts –Dataflow Diagrams –Prototyping Structured design –Modularity –Coupling –Cohesion Reading: Brookshear: Chapter 6

3 Thus far in CSE1301… Computer Systems –Overview of what computers are made of. Components of an Algorithm –Values, Variables, Instructions, Sequence, Selection, Iteration, Procedure, Documentation The C Language –Operations, Identifiers, Types, Input/Output, Files, Arrays, Pointers, Functions, Structs, etc. –Vocabulary: main, int, float, scanf, printf, if, while, for, fopen, struct, etc But we have implemented small programs only!

4 Software Engineering Essential to have a process for large projects 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.

5 Tasks –project planning (cost, schedule, personnel) –project management –documentation –prototyping and simulation –interface design –programming –testing Computer-Aided Software Engineering (CASE) Tools Software Engineering

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

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

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

9 Prototyping Construction of simplified version of parts of the proposed system that can be analysed before further development. Types of items that can be prototyped: –screen and report format, database and file structures, system protocols, etc.

10 Modularity Top-down analysis and design. Break problem down into manageable sub-problems (or modules) Example: Hold a party Send invites Prepare food Prepare music Select people in address book Contact invited people Decide on menu Go shopping Cook Find songs on cd Create a new cd with selections …

11 Modularity Top-down analysis and design. Break problem down into manageable sub-problems (or modules) Example: Hold a party Prepare food Decide on menuGo shopping Prepare music Cook Create shopping listDrive to shopsBuy groceries …

12 Golden Rule #1 Design Top-Down, but always build Bottom-Up. Code and test the simplest components first. Test each component before using them to make sure they work Then use those components to build more complex components.

13 Structure Chart Pictorial representation of a modular structure –each module represented by a rectangle –arrows represent dependencies between modules Hold a party Prepare food Decide on menuGo shopping Prepare music Cook Create shopping listDrive to shopsBuy groceries …

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

15 Example Structure chart with labels showing data coupling goShopping ( place, menu ) { list = createGroceryList( menu ) driveTo (place ) buyItems ( list ) } goShopping createGroceryListbuyItemsdriveTo place menu list menu list place …

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 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 in function using a pointer parameter.

18 Cohesion Internal binding within function, i.e. degree of relatedness of a module’s internal parts. Logical cohesion –Internal elements perform activities that are logically similar. (Eg. I/O function) Functional cohesion –all parts are geared towards 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-structued 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 Dataflow Diagrams (DFD) Pictorial representation of data paths: –origin (source) –destination (sink, storage) –processing points (location of data manipulation, modules)

23 Dataflow diagram showing data paths Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

24 Arrows: Data Paths Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

25 Boxes: Data Sources and Sinks Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

26 Circles (Bubbles): Processing Points Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

27 Heavy Straight Lines: Data Storage Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

28 You (the Processor) are not included in the diagram! Recipe Books Menu Recipes Shop List Buy Items List Drive to Shops Prepare Menu Prepare Gocery List Name, Address Shop address list Address Cost

29 Dataflow diagrams (DFD) Emphasise the data (information) to flow through system. (rather than procedures to be executed) By following data paths, discover where data units are merged, split, or altered.

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