110 likes | 204 Views
Design and Implementation. Four Steps to Programming. Read Design Implement Test. Program. A program is a list of instructions (actions) to accomplish a task. Each instruction is an action to be performed with a program. The process includes the four steps: Read a scenario
E N D
Four Steps to Programming • Read • Design • Implement • Test
Program • A program is a list of instructions (actions) to accomplish a task. • Each instruction is an action to be performed with a program. • The process includes the four steps: • Read a scenario • Design a storyboard • Implement the code for the program • Test the program
Read • Is the description of the story, game or simulation, often called the “problem statement.”
Design • How to go about creating the animation or program • Usually includes a flowchart • A form of communicating a programs design or a programs sketch.
Flowcharting • The best way to communicate a programs design is to create a design sketch or a visual system. • Flowcharts are constructed using a basic collection of symbols and are related to the actions that occur as the program runs.
Flowchart Symbols and Details terminal processing Represents an action where the User of the program is being asked Information or a result is displayed: Words associated w/symbol: read, Print, and write. Represents the beginning and ending of a complete program: Words associated w/symbol: start, begin, end, stop and return Used to illustrate mathematical Operations, or built-in instruction Or statement. Input/output decision call Represents an action where a decision is to Be made. The outcome of a decision is a Boolean value, which is either true or false. Words w/symbol express the condition or test. Represents the action of one piece of a program calling another piece of the program.
Implementation • The written code of a program Test • Running the program for errors. • Errors in computer programs are generally referred to as bugs. Correcting errors in a program is debugging.
Other Terms • Algorithms: A textual storyboard. • Comments: Used to describe what a program is designed to do. • Functions: A math operation on numbers or other kinds of values. • Expression: A math operation on numbers or other number or other kinds of values.
Control Statements or Control Structure • Do in order • Do together • If/Else: A conditional execution control structure used to make a decision about whether a particular section of s program will be executed. • Loop: a repetitious control structure that is used to repeat a section again and again. • Do while • For all in order
Control statements can be nested meaning that one program statement can be written inside another.