week 4 iteration control structure

week 4 iteration control structure - Set Lengthworm = 1...

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

View Full Document Right Arrow Icon
Axia College Material Appendix F Application-Level Requirements Application-Level Requirements List 1. Get user input 2. Set worm length 3. Set distance to apple 4. set rate that worm moves 5. worm eats apple Input-Process-Output Chart Complete the following Input-Process-Output chart for the application using a structured programming approach. Input Process Output Get Worm length from user User inputs worm length Worm length User inputs distance to apple User inputs distance to apple Distance from worm to apple User inputs worm movement Worm movement input Worm moves at set speed Worm eats apple Worm moves beside apple apple Worm eats apple Declare, Inches, Lengthworm, DistanceRemaining As Real
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Set Lengthworm = 1 Inch DistanceRemaining = Inches If DistanceRemaining <= Lengthworm Then Enter Otherwise Repeat Lengthworm = 1.5 * Lengthworm Return to Lengthworm Enter Apple Eat Apple End program Main Module Declare, Inches, Lengthworm, DistanceRemaining As Real Call Welcome Message module Call Input Data module Call Calculations module Write “Worm eats apple” End Process Display program title Display directions Get worm length Get distance from apple Calculate distance (movement) Output result Input Length of worm (from keyboard) Distance from apple Output Worm length * 1.5 when Distance < Worm length Write “Worm eats apple” End...
View Full Document

This note was uploaded on 06/16/2011 for the course IT 205 taught by Professor Kurts during the Spring '08 term at University of Phoenix.

Page1 / 2

week 4 iteration control structure - Set Lengthworm = 1...

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

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