Presentation is loading. Please wait.

Presentation is loading. Please wait.

Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program.

Similar presentations


Presentation on theme: "Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program."— Presentation transcript:

1 Program Design BUILDING A HOUSE

2

3 Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program

4 Define the Output  The output is the last thing produced but is the first thing designed.  You wouldn’t build a house without first knowing what you want it to look like.  We will focus on using a top down approach

5 Top Down Design  Don’t get caught up in the details! 1. Determine the overall goal. 2. Break that goal into two, three or more detailed parts. Too many more details may cause you to leave things out. 3. Put off details as long as possible. Keep repeating steps 1 and 2 until you cannot reasonably break things down any further.

6

7 Develop the Logic  Output definition describes what the program is supposed to do.  Developing the logic is where you must decide how it will do that.  Two different options:  Flowcharts  Pseudocode

8 Flowcharts  Some basic rules: 1. The logic should flow from the top of the page to the bottom and from left to right. 2. Use basic symbols like Squares for basic processes, Diamonds for Decisions, Small circles for loops and connectors, Arrows for direction of flow, and Parallelograms for Input/Output such as asking the user a question or printing a report. 3. Decision symbols are the only symbols that can have more than one exit point. 4. A decision symbol should always ask a yes or no question. Example: Are you over 50? Vs How old are you? 5. Write your instructions inside the symbols in clear, plain English.

9 Pseudocode  Pseudocode is a method of writing logic using sentences instead of the diagrams of flowcharting.  Pseudocode doesn’t have any programming statements but is not free flowing English statements.

10 Finally, Write the Program


Download ppt "Program Design BUILDING A HOUSE. Steps to Designing a Program 1. Define the Output 2. Develop the logic to get that output 3. Write the program."

Similar presentations


Ads by Google