Amalan Kejuruteraan Sem /2014

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

CS101: Introduction to Computer programming
PROBLEM SOLVING TECHNIQUES
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
PSEUDOCODE & FLOW CHART
Flow Control Analysis & Design Tool: Flowcharts
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
ALGORITHMS AND FLOWCHARTS
Chapter 2- Visual Basic Schneider
ALGORITHMS Algorithm: Is an ordered set of unambiguous, executable steps defining a terminating process Unambiguous:during the execution of an algorithm,
The Program Development Cycle and Program Design Tools
Developing logic (Examples on algorithm and flowchart)
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 3 Planning Your Solution
Review Algorithm Analysis Problem Solving Space Complexity
Fundamentals of C programming
Chapter 1 Pseudocode & Flowcharts
ALGORITHMS AND FLOWCHARTS
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.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Pseudocode Demo for Payroll.c
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
PSEUDOCODE C Programming Technique – Firdaus-Harun.com.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
1 Program Planning and Design Important stages before actual program is written.
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Problem, Problem Solving, Algorithm & Flow Charts –Part 1 Presented By Manesh T Course:101 CS 101CS Manesh T1.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
ALGORITHMS AND FLOWCHARTS. A typical programming task can be divided into two phases: Problem solving phase  produce an ordered sequence of steps that.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Lecture 2: Introduction to Programming EEE2108: 공학프로그래밍 서강대학교 전자공학과 2011 학년도 2 학기 - Algorithms and Flowcharts -
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
Program design Program Design Process has 2 phases:
ALGORITHMS AND FLOWCHARTS
GC101 Introduction to computers and programs
Lesson 2 Flowcharting.
Programming Languages
Unit 3: ALGORITHMS AND FLOWCHARTS
Problem , Problem Solving, Algorithm & Flow Charts –Part 1
while Repetition Structure
Chapter 2- Visual Basic Schneider
ALGORITHMS AND FLOWCHARTS
COVERED BASICS ABOUT ALGORITHMS AND FLOWCHARTS
Introduction to Computing
CS111 Computer Programming
Computer Programming Flowchart.
Algorithms and Flowcharts
Introduction To Flowcharting
ALGORITHM Basic CONCEPTS of Basic Concepts of Algorithm
Numbering System TODAY AND TOMORROW 11th Edition
ALGORITHMS AND FLOWCHARTS
Unit# 9: Computer Program Development
ALGORITHMS AND FLOWCHARTS
Algorithms & Pseudocode
Computers & Programming Languages
ALGORITHMS AND FLOWCHARTS
Chapter 2- Visual Basic Schneider
Introduction to Algorithms and Programming
Faculty of Computer Science & Information System
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
Introduction to Programming
Basic Concepts of Algorithm
Introduction to Programming
Presentation transcript:

Amalan Kejuruteraan Sem 3 2013/2014 Problem Solving Tool Amalan Kejuruteraan Sem 3 2013/2014

Structure Chart/Hierarchy Chart Structure Chart shows : the functional flow through your program. how you are going to break your program into logical steps, each step will be a separate module. the interaction between all the parts(modules) of your program.

Flooring cost Get UserInfo Calculate Cost Print Report Calc Linoleum Calc Carpeting Calc Kitchen Calc Bathroom Calc Bedroom Calc Living Areas Structure chart for calculating square footage.

Pseudo code Precise algorithmic description of program logic Its purpose is to describe, in precise algorithm detail, what the program being design is to do. Requires the defining the steps to accomplish the task in sufficient detail so that they can be converted into a computer program.

Pseudocode for Calculate Bathrooms Algorithm Calculate Cost 1.0 prompt user and read linoleum price 2.0 prompt user and read number of bathrooms 3.0 set total bath area and baths processed to zero 4.0 while (bath processed < number of bathrooms) 4.1 prompt user and read bath length and width 4.2 total bath area = total bath area + bath length * bath width 4.3 add 1 to bath processed 5.0 end while 6.0 bath cost = total bath area * linoleum price 7.0 return bath cost End Algorithm calculate Bathrooms

Flowchart Uses standardized symbols to show the steps the computer needs to take to accomplish the programs goal.

Basic Symbols Represent Various Operation Direction Preparation Terminal – beginning / end Process Decision Input / Output Connector Sub-function

Flowchart for the whole program Start Get User Info Calculate Cost Print Report Start

Calculate Cost Read (linoPrice) Read (numBath) bthArea zero bathProc zero 1

1 bathProc < numBath READ (bthLngth,bthWdth) bthArea bthArea + linoCost RETURN No Yes bthArea * linoPrice

Decision Structure If student’s grade is greater than or equal to 60 Pseudocode If student’s grade is greater than or equal to 60 Print “Passed” Else Print “Failed”

Repetition Structure While product is less than or equal to 1000 Pseudocode While product is less than or equal to 1000 Multiply product by two