Category: Entertainment

Presentation Description

No description available.


Presentation Transcript


Flowcharts Computer Games Design

Describing Procedures Precisely:

Describing Procedures Precisely Flowcharts Diagrams that include words which describe the individual tasks to be carried out and the decisions to be made in regard to carrying out tasks .


Flowcharts Flowchart describing the procedure involved in preparing a set of envelopes for posting. Write address on envelope. Is letter urgent? Begin Stick first class stamp on envelope. Stick 2nd class stamp on envelope Fold letter Lick gum Seal envelope Any more letters? End Yes No Yes No


Flowcharts Rectangle represents actions. can only have one entry point. can only have one exit point. Diamond represents a decision. phrased like a question. can only have one entry point. must have one exit point for each possible answer. Arrows show which action is executed after the previous one. Open door Is door open? Yes No

Flowchart Exercises:

Flowchart Exercises Design flowcharts for the following tasks! Leaving the classroom. imagine you are writing instructions for a robot! Knocking a set of nails into a block of wood. see French 8.20 You don’t know how long each nail will take. Making a sandwidge (choice of ham or cheese) look at answer in Appendix II Making sandwidges from a loaf. Appendix II Keep to the Rules!

Procedure for leaving room:

Procedure for leaving room Top down design/stepwise refinement Start Walk to door Open door Move through door End Place hand on door handle Turn handle Swing door open Are we inside or outside the room? Push door Pull door Outside Inside Details of ‘Open door’ Details of ‘swing door open’ Unlock door

The Three Programming Control Structures.:

The Three Programming Control Structures. All programs can be described by combining the following 3 control structures: Simple Sequence Simple Selection (IF-THEN-ELSE) Simple Repitition (Loop)

Simple Sequence:

Simple Sequence BEGIN Walk to door Open door Move through door END Start Walk to door Open door Move through door End Note the ‘indentation’

Simple Selection:

Simple Selection IF inside room THEN Pull door ELSE Push door ENDIF Are we inside or outside the room? Push door Pull door Outside Inside Note the ‘indentation’

Simple Repitition:

Simple Repitition WHILE nail is sticking out hit nail ENDWHILE Hit nail Is nail sticking out? yes no Note the ‘indentation’

authorStream Live Help