180 likes | 824 Views
Flowchart and Pseudocode. DesignTools Part2. Topics. Input Process Output (IPO) Chart Hierarchy/Structured Chart Flow Chart Pseudo Code Source Code. Design Steps and Tools. IPO Chart. Hierarchy or Structured Chart. Flow Chart. Pseudo Code. Source Code. FlowChart.
E N D
Flowchart and Pseudocode DesignTools Part2
Topics • Input Process Output (IPO) Chart • Hierarchy/Structured Chart • Flow Chart • Pseudo Code • Source Code DesignTools Part2
Design Steps and Tools IPO Chart Hierarchy or Structured Chart Flow Chart Pseudo Code Source Code DesignTools Part2
Flowcharting Symbols REPETITION START STOP PREDEFINED PROCESS (MODULES) ASSIGNMENT INPUT OUTPUT SELECTION CONNECTOR FLOW LINES COMMENT DesignTools Part2
Write a program that asks the user to enter a temperature reading in centigrade and then prints the equivalent fahrenheit value. Input Process Output Prompt for centigrade value Read centigrade value Compute fahrenheit value Display fahrenheit value fahrenheit centigrade Example1 START Convert centigrade to fahrenheit inputCent centigrade calcFah fahrenheit = (1.8*centigrade) + 32 outputFah fahrenheit STOP DesignTools Part2
Example2 START Display welcomeMsg using firstName and lastName Write a program that asks the user to enter firstName and lastName and display a welcome message to screen as “Hello firstName lastName! Welcome to HCCS” inputNames firstName, lastName outputWelcomeMsg welcomeMsg STOP DesignTools Part2
Pseudocode DesignTools Part2
Pseudocode • Step-by-step solution that will solve the problem • It is a cross between the human language and the computer language • A list that describes the desired manipulation of data DesignTools Part2
Input Process Output Prompt for centigrade value Read centigrade value Compute fahrenheit value Display fahrenheit value fahrenheit centigrade Example1 PSEUDOCODE: Display "Enter Centigrade:" Input centigrade fahrenheit = 1.8 * centigrade + 32 Display "Centigrade to Fahrenheit = " fahrenheit Example Result Enter Centigrade: 30 Centigrade to Fahrenheit =86 DesignTools Part2
Example2 PSEUDOCODE: Display "Enter your Firstname and Lastname: " Input firstName, lastName Display "Hello"firstName " "lastName ", Welcome to HCCS!" Example Result Enter Firstname and Lastname: SumaRao Hello SumaRao, Welcome to HCCS! DesignTools Part2