week07 - WELCOME EF 105 Spring 2006 Week 7 Topics: More on...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
    WELCOME WELCOME EF 105                Spring 2006 Week 7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Topics: More on Engineering Problem Solving Algorithms Flowcharts
Background image of page 2
    Problem Solving Logic Document the steps: 1. Algorithm, using pseudocode 2. Graphic, with the flowchart
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Algorithm Defined ALGORITHM   an ORDERED SEQUENCE of  PRECISELY defined instructions that performs  some task in a finite amount of time.  ORDERED means that the instructions can be  NUMBERED, but an algorithm must have the  ability to ALTER the order of its instructions using a  CONTROL structure.  There are three categories of algorithmic  operations   Next Slide :
Background image of page 4
    Algorithmic Operations 1. SEQUENTIAL OPERATIONS   Instructions  executed  in order 2. CONDITIONAL OPERATIONS   Control  structures that first  ask a question  to be  answered with a  true/false  answer and then  select  the  next instruction  based on the  answer 3. ITERATIVE OPERATIONS (LOOPS): Control  structures that  repeat  the execution of a block  of instructions
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Pseudo Code Example Example Problem:  Calculate the bill when  someone buys a specific no. of some item: Pseudo code: PROMPT for number of items being purchased READ number of items being purchased PROMPT for price per item READ price per item CALCULATE subtotal CALCULATE tax CALCULATE total DISPLAY total
Background image of page 6
    PseudoCode: Common Terms  To Describe  input output computations , etc.,  the following terms are often used: Input: INPUT, READ, GET  Output: PRINT, DISPLAY, SHOW, PROMPT Compute: COMPUTE, CALCULATE, DETERMINE  Initialize: SET, INIT  Add one: INCREMENT, BUMP Decisions: TEST, IF/THEN/ELSE, WHILE/DO
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    PseudoCode Algorithms Ensure that the the task is  completely  specified Issues to Consider What data is known  before  the program runs? What data must be 
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 27

week07 - WELCOME EF 105 Spring 2006 Week 7 Topics: More on...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online