Program Design Divide and Conquer –Divide the program into separate tasks Functional Decomposition Top-Down Design –Divide an overall problem into discrete.

Slides:



Advertisements
Similar presentations
Spring Semester 2013 Lecture 5
Advertisements

Partitioning and Divide-and-Conquer Strategies Data partitioning (or Domain decomposition) Functional decomposition.
Chapter 3: Modules, Hierarchy Charts, and Documentation
Programming Logic and Design Fourth Edition, Introductory
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Structured Programming structured programming: A technique for organizing and coding computer programs in which a hierarchy of modules is used, each having.
J. Michael Moore Software Design CSCE 110 Influenced by material developed by James Tam & Jennifer Welch.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
Visual Basic: An Object Oriented Approach
Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
CS 201 Functions Debzani Deb.
Introduction to Computers and Programming Lecture 13: User defined methods Instructor: Evan Korth New York University.
1 How to use Memshare in Shipbuilding – Quality Control.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
Introduction to Methods
Word Create footnotes and endnotes. Course contents Overview: Be a footnote and endnote whiz Lesson 1: Add footnotes and endnotes Lesson 2: Beyond the.
Top-Down Design and Modular Development
 Create Events  Generate Invitations  Calendar Sharing  Search for Events  Mobile Access  Event Planning.
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.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 5 Functions.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 3 Simple.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Computer Science: A Structured Programming Approach Using C1 4-6 Scope Scope determines the region of the program in which a defined object is visible.
Systems analysis and design, 6th edition Dennis, wixom, and roth
Top-Down Design and Modular Development. The process of developing methods for objects is mostly a process of developing algorithms; each method is an.
PLANNING ENGINEERING AND PROJECT MANAGEMENT
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
1 Programming with MATLAB ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
B065: PROGRAMMING Sub Procedures I. Starter  Identify the separate tasks to be performed in the programming task below (break it down into numbered sections).
Lecture 13: 10/10/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
An Automatic Software Quality Measurement System.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
CSCE 121: Introduction to Program Design and Concepts Dr. J. Michael Moore Spring 2015 Set 4: Computation 1 Based on slides created by Bjarne Stroustrup.
Chapter 8 First steps in modularisation. Objectives To introduce modularisation as a means of dividing a problem into subtasks To present hierarchy charts.
First Steps in Modularization. Simple Program Design, Fourth Edition Chapter 8 2 Objectives In this chapter you will be able to: Introduce modularization.
2. Program Development Intro Programming in C++ Computer Science Dept Va Tech August 2001 ©2001 Barnette ND & McQuain WD 1 Top-Down Design:A solution method.
Lecture 6: Writing the Project Documentation Part IV.
KIC/Computer Programming & Problem Solving 1.  Introduction  Program Modules in C  Math Library Functions  Functions  Function Definitions  Function.
1 5.4 Modular Design Top-Down Design Structured Programming Advantages of Structured Programming.
FUNCTIONS. Topics Introduction to Functions Defining and Calling a Void Function Designing a Program to Use Functions Local Variables Passing Arguments.
Nayda G. Santiago Oct 28, 2009 ICOM/INEL Poster Session Provide a forum to show off work and discuss research in an informal setting May be the.
Problem Decomposition and Abstraction. Problem Solving Which one is easier:  Solving one big problem, or  Solving a number of small problems?
04/02/ Procedures Top-down approach / Stepwise Refinement & Sub Procedures.
To divide by 10 (to make something ten times smaller).
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, What's Next Linking to an External Library The Book's Link Library Stack Operations Defining.
Multimedia Web site development Plan your site Steps for creating web pages.
ME 120: User-defined functions: average analog input reading Arduino Programming – Part 5: User-defined functions ME 120 Mechanical and Materials Engineering.
Today… Modularity, or Writing Functions. Winter 2016CISC101 - Prof. McLeod1.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 6: Stepwise refinement revisited, Midterm review.
Chapter 6 Functions The Tic-Tac-Toe Game. Chapter Content In this chapter you will learn to do the following: 0 Write your own functions 0 Accept values.
Lotus Diagrams Flow Charts Examples and How To
CS240: Advanced Programming Concepts
Topic: Functions – Part 2
Functions CIS 40 – Introduction to Programming in Python
قانون المنافسة ومنع الاحتكار
Starting Out with Programming Logic & Design
Topics discussed in this section:
PROGRAMMING Sub Procedures I.
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Authors: Barry Smyth, Mark T. Keane, Padraig Cunningham
Week 4 Lecture-2 Chapter 6 (Methods).
A function is a group of statements that exist within a program for the purpose of performing a specific task. We can use functions to divide and conquer.
Starting Out with Programming Logic & Design
Unit 1: Principles of Computer Science
Presentation transcript:

Program Design Divide and Conquer –Divide the program into separate tasks Functional Decomposition Top-Down Design –Divide an overall problem into discrete tasks, each of which can be coded in a single procedure!!!

Benefits of Functional Decomposition Large problems may be more easily divided into smaller tasks. A program is easier to maintain if each procedure can be tested separately. A top-down design lets you see how procedures are related to each other When the overall design is clear, it is easier to concentrate on the details of each part

Example Program Write a program that will display the numbers of a list example: given a list of 4 numbers (each having a value between 0 and 9), display the values, separated by a comma and a space. 1, 2, 3, 4

How do you go about doing this Divide and Conquer

Structure Chart for Displaying a List of Numbers on the Screen

Functional Decomposition of Printing Numbers to screen

Now combine blocks to write program Start with template Add instructions as needed to create working program Add enough comments so that you can reuse the code you write this week later (and also so that at the end of the semester, you can look at the code and quickly determine what the code does!).