Week 2: Logic Flashcards
What are the 3 classes of constructs in programming?
Sequence
Selection
Iteration
Selection constructs:
Represent different paths through the set of instructions
Iteration constructs:
Represent repetition of the same set of instructions until a specified condition has been met
Sequential constructs:
One statement follows another and the statements are executed in order
Structured program consists of…
Sets of simple constructs, each of which has one entry and one exit point.
Preliminary design techniques include:
Pseudo-coding
Flow charting
Pseudo-code:
A set of shorthand notes in a human (non-programming) language that itemizes the key steps in the sequence of instructions that produce a programming solution.
Flow charts:
A set of conventional symbols connected by arrows that illustrate the flow of control through a programming solution.
C Programming supports 3 selection constructs:
Optional paths
Alternative paths
Conditional expression