Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Flowcharts and Pseudocode for Computing Algorithms in Engineering - Prof. Maria Alba-Flore, Study notes of Engineering

An introduction to algorithms, flowcharts, and pseudocode for engineering students in the engr 1731 computing for engineers course during spring 2009. The importance of algorithms, their representation as flowcharts and pseudocode, and their independence from programming languages. Examples of pseudocode and flowchart planning for various engineering problems are also provided.

Typology: Study notes

Pre 2010

Uploaded on 10/01/2009

koofers-user-mdp-1
koofers-user-mdp-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
3/22/2009
1
Mechanical and Electrical Engineering Technology
Spring 2009
ENGR 1731
Computing for Engineers
Prof.AlbaFlores
FlowchartsandPseudocode
An Algorithm is a well-defined procedure to solve a
problem.
An algorithm is a very useful tool that a programmer
uses to express the method that will be used to
solve a problem
Algorithms
solve
a
problem
.
Once that an algorithm is well defined, the
programmer can translate it directly to a specific
computer language.
Algorithms can be represented as flowcharts or/and
pseudocodes
Flowcharts and pseudocodes are also other useful tools
that are used to plan how a problem can be solve using a
programming language.
Flowcharts and poseudocodes are independent of the
il
FlowchartsandPseudocode
programm
i
ng
l
anguage .
If you have a good flowchart (or pseudocode) for a
given problem, it will be straightforward to implement that
flowchart ( or pseudocode) into a program in any
computing language.
A Flowcharts is a graphical approach to
create a coding plan.
A pseudocode is a verbal description of your
FlowchartsandPseudocode (cont.)
coding plan.
You may want to use either or both for your
programming projects
For simple programs, pseudocode may be the best
planning approach.
Example 1.
Suppose we want to create a program to convert mph
to ft/s. The output should be a complete table with a
title and column headings.
A
pseudocode
for this example could be:
A
pseudocode
for
this
example
could
be:
Define the vector of mph values
Convert mph to ft/s
Combine the mph and ft/s vectors into an array
Create a table title
Create column headings
Display the table
An equivalent flowchart planning could be:
pf3

Partial preview of the text

Download Flowcharts and Pseudocode for Computing Algorithms in Engineering - Prof. Maria Alba-Flore and more Study notes Engineering in PDF only on Docsity!

Mechanical and Electrical Engineering Technology Spring 2009

ENGR 1731

Computing for Engineers

Prof. Alba‐Flores

Flowcharts and Pseudocode

ƒ An Algorithm is a well-defined procedure to solve a problem.

ƒ An algorithm is a very useful tool that a programmer uses to express the method that will be used to solve a problem

Algorithms

solve a problem.

ƒ Once that an algorithm is well defined, the programmer can translate it directly to a specific computer language.

ƒ Algorithms can be represented as flowcharts or/and pseudocodes

ƒ Flowcharts and pseudocodes are also other useful tools that are used to plan how a problem can be solve using a programming language.

ƒ Flowcharts and poseudocodes are independent of the i l

Flowcharts and Pseudocode

programming language.

ƒ If you have a good flowchart (or pseudocode) for a given problem, it will be straightforward to implement that flowchart ( or pseudocode) into a program in any computing language.

ƒ A Flowcharts is a graphical approach to

create a coding plan.

ƒ A pseudocode is a verbal description of your

Flowcharts and Pseudocode (cont.)

coding plan.

ƒ You may want to use either or both for your

programming projects

For simple programs, pseudocode may be the best planning approach.

Example 1. Suppose we want to create a program to convert mph to ft/s. The output should be a complete table with a title and column headings.

A pseudocode for this example could be:A pseudocode for this example could be:

  • Define the vector of mph values
  • Convert mph to ft/s
  • Combine the mph and ft/s vectors into an array
  • Create a table title
  • Create column headings
  • Display the table

An equivalent flowchart planning could be:

ƒ Flowchart are pictoral representation of a computer program.

ƒ Flowcharts and poseudocodes are tools intended to help programmers to create better computer programs.

More on Flowcharts and Pseudocode

ƒ Flowcharts can also be use effectively to illustrate the structure of a program to nonprogrammers, since flowcharts emphasize the logical progression of ideas.

ƒ For complicated programming tasks, the combination of flowcharts and pseudocodes are highly recommended.

ƒ Flow charts are very useful because they help to t ”bi i t ” f

More on Flowcharts and Pseudocode (cont.)

create a ”big picture” of your program.

ƒ To create flowcharts it is recommended that you use the standard flowcharting symbols.

Standard Flowcharting Symbols Example 2. Create a flowchart that will show how the following problem can be solved using a computer language.

  • You are assigned to write a program that will evaluate whether to issue a driver license based on the applicant age.

A flowchart that illustrate the process could be:

Example 3. Create a flowchart that will show how the following problem can be solved using a computer language. -You are assigned to write a program that will determine test grades based on the scores. The grades should be based on the following criteria: Grade Score A 90 to 100

A flowchart that illustrate the process could be:

A 90 to 100 B 80 to 90 C 70 to 80 D 60 to 70 F < 60