Basic Programming Constructs Flashcards
What is an algorithm?
An algorithm is a step-by-step process or a sequence of comoutable instructions that can be used to solve a problem in a finite amount of time.
What is the flow of the algorithm?
Input, Process, Storage, Output
What are the types of Unified Modelling Language (UML)?
Flow charts, class diagrams, entity-relationship diagrams
What is a flowchart?
A flow chart is a graphical represntation where shapes are linked to represent sequential steps of an algorithm.
What are symbols?
Symbols are used to represent different types of operations.
What are flow lines?
Flow lines indicate the sequence of operations.
What is the symbol for terminal symbols?
A rectangle with rounded edges at the left and right sides.
What is the symbol for input/output?
A parallelogram.
What is the symbol for a process?
A rectangle.
What is the symbol for a decision?
A diamond.
What are the pros of flowcharts?
- It is a way of documenting a simple program clearly
- It is easy to understand
- It is a universal language that can be understood by anyone
What are the cons of flowcharts?
- It has a limited ability to express complex logic and may not capture details of a complex process
- It is time-consuming to alter
- Flowcharts may become outdated if the process represents change
What are the three basic programming constucts?
Sequence, Selection, Iteration
What is sequence?
Sequence is the order in which the lines of codes in programs run.
What is selection?
Selection determines which path a program takes when it is running.