E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

14
E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004

Transcript of E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Page 1: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

E-Genting Programming Competition 2004

Pre-Competition Workshop, Week 3

5 October 2004

Page 2: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Programs versus Systems If a programming problem can be

conveniently solved by top-to-bottom pseudo-code alone, it’s a program.

If a programming problem can only be solved by considering multiple cooperating processes, it’s a system.

Page 3: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

System Design Tools dataflow diagrams; pseudo-code; state transition diagrams and

tables; entity relationship diagrams.

Page 4: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

A Common Theme dataflow diagrams; flowcharts; state transition diagrams; syntax diagrams.

Page 5: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Definition of a Dataflow Diagram

Page 6: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

What is a Process?

A process is an encapsulated computational entity that: receives input data; processes data; emits output data; and/or stores state information.

Page 7: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Flowcharts A flowchart is a

type of dataflow diagram in which the only datum that passes between the processes is the control token.

Page 8: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

State Transition Diagrams 1

Page 9: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

State Transition Diagrams 2

A state transition diagram is a specialised subtype of dataflow diagram that emphasises the treatment of an imagined or real variable by enclosing a description of each of the variable’s states in a bubble; and then representing the processes that may operate on the variable by lines from one state to another.

Page 10: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Syntax Diagrams

Page 11: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Think dataflow if there is: a requirement for a complex process that

needs to be partitioned into sub-processes that are simpler and easier to program;

a requirement to access information at one time, when the information is delivered at a different time;

a requirement to read information in the middle of a top-to-bottom sequence, but the information is delivered via a call to the application (the client-client standoff).

Page 12: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Data Projection and Sorting

Page 13: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Traffic Lights

Page 14: E-Genting Programming Competition 2004 Pre-Competition Workshop, Week 3 5 October 2004.

Entity Relationship Diagram