Flowcharts and programming Techniques

Slides:



Advertisements
Similar presentations
An Introduction to Programming By :- Vishal Hirani B.Tech II year (CSE)
Advertisements

Program Flowchart, Pseudocode & Algorithm development
Chapter 2: Problem Solving
Repetition Control Structures School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 9, Friday 3/07/2003)
Introduction to Flowcharting
Introduction to Flowcharting
UNIT 2. Introduction to Computer Programming
Chapter 3 IFTHENELSE Control Structure © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured.
Introduction to Flowcharting
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
Fundamentals of Algorithms MCS - 2 Lecture # 4
Chapter 2- Visual Basic Schneider
An Introduction to Programming with C++ Fifth Edition
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 3 Planning Your Solution
(C)opyright 2003 Scott/Jones Publishers Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Scott/Jones Publishers.
Chapter 1 Pseudocode & Flowcharts
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 5 Structured Program.
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 2: Problem Solving
An ordered sequence of unambiguous and well-defined instructions that performs some task and halts in finite time Let's examine the four parts of this.
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up 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.
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.
Programming Concepts Chapter 3.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
Chapter 2 Problem Solving On A Computer 2.1 Problem Solving Steps Solving a problem on a computer requires steps similar to those followed when solving.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
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.
Chapter 2: General Problem Solving Concepts
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
(C)opyright 2000 Scott/Jones Publishers Introduction to Flowcharting.
Introduction to Computing Dr. Nadeem A Khan. Lecture 2.
Data Structures & Algorithms CHAPTER 1 Introduction Ms. Manal Al-Asmari.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
1 Introduction to Flowcharting Computer Science Principles ASFA.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 7: The Repetition Structure Introduction to Programming with C++ Fourth Edition.
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
Introduction to Flowcharts
 Problem Analysis  Coding  Debugging  Testing.
Pseudocode (pronounced SOO-doh-kohd)  is a detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-styled.
Chapter 1 Introduction.
ALGORITHMS AND FLOWCHARTS
Introduction to Programming / chapter 3 / COM1022
Introduction to Flowcharting
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 2- Visual Basic Schneider
Introduction to Computing
Algorithms and Flowcharts
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
Introduction to Flowcharting
Introduction to Computer Programming
Unit# 9: Computer Program Development
How to develop a program?
Chapter 9 Structuring System Requirements: Logic Modeling
Structured Program Design
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 2- Visual Basic Schneider
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 9 Structuring System Requirements: Logic Modeling
Introduction to Flowcharting
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Flowcharts and programming Techniques Chapter 5 Flowcharts and programming Techniques

Introduction A flowchart is a diagram consisting of labeled geometrical symbols together with rows connecting one symbol to another A program flowchart pictures the sequence of instructions for solving a particular problem ( usually by means of a computer program).

Introduction BOUNS = 0.03 * SALARY

Introduction The sequence of instructions for solving a particular problem is called algorithm. Express the algorithm through a flowchart Easier to draw the flowchart than to write the program directly. Easier to understand than program Easy for development. Flowcharts are independent of any particular programming language

VARIABLES ,DATA-NAMES, PROGRAMMING SATATEMENTS a variable means a data item whose value may change during the execution of the program. Examples:- Salary Bouns AVERAGE Assignment Statements Salary = 500 Bouns = 0,03*Salary AVERAGE = ( T1+T2+T3)/3

VARIABLES ,DATA-NAMES, PROGRAMMING SATATEMENTS HOURS = HOURS + 12 Counter = Counter + 1

Input/Output Statements Read NUMBER, HOURS,RATE Write NUMBER, GROSS , NET

FLOWCHART SYMBLOS

FLOWCHART SYMBLOS Terminal symbol Input/Output symbol

FLOWCHART SYMBLOS process symbol

FLOWCHART SYMBLOS Decision symbol.

FLOWCHART SYMBLOS Example: A company plans to give a year-end 3% to each of its employees. However, if an employee has been working 10 or more years at the company , he is to get an additional $50.

FLOWCHART SYMBLOS

FLOWCHART SYMBLOS Example: The HP company plans to give a year-end 3% bonus to each of its employees earning $10,000 or more per year , and a fixed $300 bonus for the other employees.

FLOWCHART SYMBLOS

LOOPS AND THEIR CONTROL BY A COUNTER

LOOPS AND THEIR CONTROL BY A COUNTER

CONTROL OF LOOPS BY HEADER OF TRALIER RECORDS Control by a Header Record

CONTROL OF LOOPS BY HEADER OF TRALIER RECORDS Control by a Trailer Record

ACCUMULATORS

ACCUMULATORS Example : Suppose that a company wants to find the total salary paid to its employees of a company.

TWO SPECIAL ALGORITHMS: The average of the salaries,

TWO SPECIAL ALGORITHMS: The largest salary

DO LOOPS

DO LOOPS Example: A company has 80 employees . Draw a flowchart to find the average salary and the number of employees earning above the average salary

Example