Pseudocode Demo for Payroll.c

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

Representing an algorithm using Flowcharts
Repetition Control Structures School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 9, Friday 3/07/2003)
1.4 Programming Tools Flowcharts Pseudocode Hierarchy Chart
Introduction to Flowcharting
Introduction to Flowcharting
Flow Control Analysis & Design Tool: Flowcharts
Understanding the Three Basic Structures
Introduction to Flowcharting
Introduction to Flowcharting A Supplement to Starting Out with C++, 4th Edition by Tony Gaddis Published by Addison-Wesley.
Subject: Information Technology Grade: 10
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
ALGORITHMS AND FLOWCHARTS
Computer Programming Rattapoom Waranusast Department of Electrical and Computer Engineering Faculty of Engineering, Naresuan University.
Java Planning our Programs Flowcharts Arithmetic Operators.
Session Objectives# 24 COULD code the solution for an algorithm
Fundamentals of Algorithms MCS - 2 Lecture # 4
1 Pseudocode For Program Design. 22 Rules for Pseudocode Write only one statement per line Capitalise initial keyword Indent to show hierarchy and structures.
Chapter 2- Visual Basic Schneider
The Program Development Cycle and Program Design Tools
Developing logic (Examples on algorithm and flowchart)
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
(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
Algorithms A Central Heating system Start Is temp <19
Computer Programming 12 Lesson 2 - Organizing the Problem By Dan Lunney.
Programming Techniques I SCJ1013
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
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.
CSEB114: Principle of programming
Flowcharts! January 13, 2005 These are today’s notes! Do you think we will get more snow?
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
ITEC113 Algorithms and Programming Techniques
1 Program Planning and Design Important stages before actual program is written.
Pseudocode An Introduction. Flowcharts were the first design tool to be widely used, but unfortunately they do not reflect some of the concepts of structured.
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
(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.
Flowcharts Lecture 12.
Topics: Selection Statements. Processing Involving Selecting Instructions An instruction that allows deviation and selection to take place uses the ‘IF’
1 Introduction to Flowcharting Computer Science Principles ASFA.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
ALGORITHMS AND FLOWCHARTS. A typical programming task can be divided into two phases: Problem solving phase  produce an ordered sequence of steps that.
Program Program is a collection of instructions that will perform some task.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Lecture 2: Introduction to Programming EEE2108: 공학프로그래밍 서강대학교 전자공학과 2011 학년도 2 학기 - Algorithms and Flowcharts -
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
Unit 9.1_Lesson 4_CD Resource 4a_Sensors and flowcharts Sensors and Flowcharts.
ALGORITHMS AND FLOWCHARTS
GC101 Introduction to computers and programs
Amalan Kejuruteraan Sem /2014
Introduction to Flowcharting
Flowchart Symbols Terminal Process Input/ Output Decision
COVERED BASICS ABOUT ALGORITHMS AND FLOWCHARTS
Introduction to Computing
Introduction to Flowcharting
Flowcharting: Decision Structure
Introduction to Flowcharting
Flow Charts What are they good for?.
ALGORITHMS AND FLOWCHARTS
Pseudocode & Flowcharts
Structured Program Design
الفصل الثاني الخوارزمية
Faculty of Computer Science & Information System
Introduction to Programming
Introduction to Flowcharting
Pseudocode For Program Design.
Presentation transcript:

Pseudocode Demo for Payroll.c Flowchart, Hierarchy Chart and Pseudocode

Flowchart for payroll.c main() Begin Payroll Employee # Not 0 ? Display Total Wages No Open Output File Yes Input Payrate & Hours Worked End Payroll Initialize Total = 0 Calculate Wages Increment Total Wages Clear Screen Get Employee Number Output Employee Data Input Next Employee # A

Flowchart for payroll.c calc_wages() Begin calc_wages Pass in Payrate and Hours Overtime ? Yes No Calc Wages with Overtime Calc Wages without Overtime End calc_wages

main( ) calc_wages( ) Hierarchy Chart for payroll.c A hierarchy chart shows what functions other functions call.

(subroutine or function) Flowchart Symbols input/output symbol processing symbol start or stop symbol connector symbols module (subroutine or function) symbol decision symbol

Pseudocode for Payroll Program begin main open output file initialize total and employee number to 0 clear screen get employee number while (employee number not 0) input payrate and hours worked <calculate wages> increment total wages output employee data input next employee number endwhile display total wages end main begin calc_wages(payrate, hours worked) if (hours worked > 40) wages = (40 * payrate) + (hours worked - 40) * payrate * overtime multiplier else wages = hours worked * payrate endif return (wages) end calc_wages