Modular Design Using Subroutines (functions later)

Slides:



Advertisements
Similar presentations
Lecture 6: Software Design (Part I)
Advertisements

Chapter 3: Modularization
Chapter 2: Modularization
Programming Logic and Design Fourth Edition, Introductory
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Chapter 4 General Procedures
Structured Programming structured programming: A technique for organizing and coding computer programs in which a hierarchy of modules is used, each having.
Chapter 2: Input, Processing, and Output
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 4 - VB.Net by Schneider1 Chapter 4 General Procedures 4.1 Sub Procedures, Part I 4.2 Sub Procedures, Part II 4.3 Function Procedures 4.4 Modular.
Understanding the Mainline Logical Flow Through a Program (continued)
Programming Fundamentals (750113) Ch1. Problem Solving
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 3 Planning Your Solution
BPC.1 Basic Programming Concepts
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Unit 16 Procedural Programming
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Chapter 5 - VB 2008 by Schneider1 Chapter 5 - General Procedures 5.1 Sub Procedures, Part I 5.2 Sub Procedures, Part II 5.3 Function Procedures 5.4 Modular.
CSE 303 – Software Design and Architecture
Top-Down Design and Modular Development
Program Design CMSC 201. Motivation We’ve talked a lot about certain ‘good habits’ we’d like you guys to get in while writing code. There are two main.
CS0004: Introduction to Programming Subprocedures and Modular Design.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 2.
SE: CHAPTER 7 Writing The Program
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Top-Down Design and Modular Development. The process of developing methods for objects is mostly a process of developing algorithms; each method is an.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Developing Computer Games Testing & Documentation.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
CMSC 104, Version 8/061L17Top-DownDesign.ppt Top-Down Design Topics Top-Down Design Top-Down Design Examples The Function Concept Reading Sections 3.1.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
The Software Development Process
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.
Modular Design Top-Down Design. Design is represented by a hierarchy chart. Break a problem into individual tasks or modules. If a module is too complex,
1 5.4 Modular Design Top-Down Design Structured Programming Advantages of Structured Programming.
L061 Algorithms, Part 3 of 3 Topics Top down-design Structure charts Reading Sections , 3.3.
Computing Higher – SD Unit - Topic 8 – Procedure and Standard Algorithms P Lynch, St Andrew’s High School Unit 2 Software Development Process Topic.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Systems Design.  Application Design  User Interface Design  Database Design.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Design and Development Development Methodoligies Computing Science.
Chapter 7: Designing solutions to problems OCR Computing for A Level © Hodder Education 2009.
Chapter 2: Input, Processing, and Output
Introduction to Programming
Algorithm development
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Understand the Programming Process
Unit# 8: Introduction to Computer Programming
Designing and Debugging Batch and Interactive COBOL Programs
Problem Solving Techniques
MSIS 655 Advanced Business Applications Programming
Programming Fundamentals (750113) Ch1. Problem Solving
Unit 6 Assignment 2 Chris Boardley.
Chapter 1 Introduction(1.1)
Programming Logic and Design Fourth Edition, Comprehensive
Understand the Programming Process
Software Development Process
Algorithms, Part 3 of 3 Topics Top down-design Structure charts
Top-Down Design & JSP Skill Area Part D
Unit 6 - Subroutines.
Modules, Subroutines, Procedures, Functions, or Methods
Algorithms, Part 3 of 3 Topics Top down-design Reading
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Modular Design Using Subroutines (functions later)

Try to make a complicated problem more understandable by dividing it into smaller, less complex sub-problems aka stepwise refinement. Stepwise refinement is related to top-down design which means that the more general tasks occur near the top of the design and more specific tasks occur below. Structured programming enhances programming productivity. Their use leads to programs that are easier to read and maintain. Programs contain fewer errors, which are easier to find and correct. There is less chance of generating new errors in the future. The goal of top-down design is to break a problem into individual tasks, or modules, that can easily be transcribed into pseudocode, flowcharts, or a program.

The top modules manipulate the modules beneath them. While the higher-level modules control the flow of the program, the lower-level modules do the actual work. Some subtasks in the third row do not require further refinement. The most complicated subtask, the computation of the monthly payment, has been broken down further. This task is carried out by applying a standard formula found in finance books.

Structured Programming Sequence Selection Repitition

Why use Structured Programming? Easy to write - programmer develops small portion of the whole at a time and dont have to worry about the bigger picture. The work can be divided among several programmers. It was proven that structured programs require significantly less time to write. Code is reusable saving time and reliability is guaranteed. Easy to debug - because each procedure is relatively small. Many times procedures are checked against other dummy procedures or calls, just to make sure that the procedure is working. Easy to understand - the interconnections of the procedures says a lot about the modular design of the program. The meaningful procedure names, along with relevant comments, identify the tasks performed by the modules. The meaningful variable names help the programmer to recall the purpose of each variable. Easy to change – since a structured program is self-documenting and relatively easy to deduce. Modifying a structured program often amounts to inserting or altering a few procedures rather than revising an entire complex program.

Do statement Test something Do statement Subprocedure or Function

Do statement Subprocedure or Function