Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Working With Algorithm and Flowcharts
CS 240 Computer Programming 1
Nested if-else Statements.  Should be indented to make the logic clear.  Nested statement executed only when the branch it is in is executed. For example,
Algorithms An algorithm is a finite sequence of instructions, logic, an explicit step-by-step procedure for solving a problem. Specific algorithms sometimes.
The Need for Program Design A program must be designed before it is written. You should not go to the keyboard and start typing instructions into the program.
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Introduction to Flowcharting
Introduction to Flowcharting
PSEUDOCODE & FLOW CHART
Flow Control Analysis & Design Tool: Flowcharts
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
An Object-Oriented Approach to Programming Logic and Design
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Documentation Letts Study Guide Information Systems - IT Chapter 19.
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
ITEC113 Algorithms and Programming Techniques
Chapter 2- Visual Basic Schneider
PRESENTED BY NASIR ABBAS. FLOW CHART CONTENTS What is a flow chart? Flow chart symbols.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 3 Planning Your Solution
The Program Design Phases
(C)opyright 2003 Scott/Jones Publishers Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Scott/Jones Publishers.
CSC103: Introduction to Computer and Programming
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Flowchart IDT. What is a flowchart? Visual representation of a flow of data Outline of process or a solution to a problem Outline the basic logic behind.
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
C++ If….Else Statements and Flowcharts October 10, 2007.
Chapter 2 - Algorithms and Design
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Flowcharts.
Visual Basic Programming
ALGORITHM List of instructions for carrying out some process step by step. A sequence of instructions which has a clear meaning and can performed with.
ITEC113 Algorithms and Programming Techniques
LO: We’re learning to demonstrate the need for breaking down problems into smaller ones.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
(C)opyright 2000 Scott/Jones Publishers Introduction to Flowcharting.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Introduction to Computing Dr. Nadeem A Khan. Lecture 2.
Visual Basic Flowcharts October 10, Turn in your vocabulary words before you leave!
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Flowcharts. Learning Objectives To learn how to break down tasks How to create a flowchart.
Expressing Algorithms as Flowcharts and Pseudocode
Algorithms and Pseudocode
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
HNC Flow Chart 1 IT Systems Analysis and Design SSADM – Design.
Lecture 3: Developing Procedural Thinking (How to think like a programmer) B Burlingame 16 Feb 2016.
Learning Objective To be able to… Understand flow chart symbols Complete and correct flow chart algorithms Create a program based on a flow chart.
ICS124 Session 9 Flowcharting 1. By the end of this section the student will be able to:  Name the three structures of the Structure Theorem  Identify.
Flow Charts. Flow charts A flowchart is a schematic (idea of doing something) representation of a process. They are commonly used in Computer Science.
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
Algorithms and Flowcharts
ALGORITHMS AND FLOWCHARTS
Introduction to Computing
Programming Flowcharts
Introduction To Flowcharting
2.0 Problem Solving PROGRAM DESIGN
Unit# 9: Computer Program Development
Problem-Solving and Control Structures By Faith Brenner
Chapter 2- Visual Basic Schneider
Introduction to Algorithms and Programming
Faculty of Computer Science & Information System
Chapter 2- Visual Basic Schneider
My Take on the Largest Number Algorithm
Problem-Solving and Control Structures By Faith Brenner
No Yes START Do you live in Scotland? Take umbrella See last Flowchart
Start or end of algorithm: Action/process step:
Developing a Program.
Flowcharts Some Rules.
Introduction to Programming
Presentation transcript:

Program Design BUILDING A HOUSE

Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program

Define the Output  The output is the last thing produced but is the first thing designed.  You wouldn’t build a house without first knowing what you want it to look like.  We will focus on using a top down approach

Top Down Design  Don’t get caught up in the details! 1. Determine the overall goal. 2. Break that goal into two, three or more detailed parts. Too many more details may cause you to leave things out. 3. Put off details as long as possible. Keep repeating steps 1 and 2 until you cannot reasonably break things down any further.

Develop the Logic  Output definition describes what the program is supposed to do.  Developing the logic is where you must decide how it will do that.  Two different options:  Flowcharts  Pseudocode

Flowcharts  Some basic rules: 1. The logic should flow from the top of the page to the bottom and from left to right. 2. Use basic symbols like Squares for basic processes, Diamonds for Decisions, Small circles for loops and connectors, Arrows for direction of flow, and Parallelograms for Input/Output such as asking the user a question or printing a report. 3. Decision symbols are the only symbols that can have more than one exit point. 4. A decision symbol should always ask a yes or no question. Example: Are you over 50? Vs How old are you? 5. Write your instructions inside the symbols in clear, plain English.

Pseudocode  Pseudocode is a method of writing logic using sentences instead of the diagrams of flowcharting.  Pseudocode doesn’t have any programming statements but is not free flowing English statements.

Finally, Write the Program