Chapter 7 Algorithm Design And Problem Solving: Unit 7.2: Computer Systems, Sub-systems And Decomposition Flashcards
Describe a computer system.
Made up of software, data, hardware, communications and people; each computer system can be divided up into a set of sub-systems. Each sub-system can be further divided into sub-systems and so on until each sub-system just performs a single action.
Describe top-down design.
The decomposition of a computer system into a set of sub-systems, then breaking down each sub-system into a set of smaller sub-systems, until each sub-system just performs a single action.
How can a problem be decomposed?
By dividing the problem into 4 different components:
Inputs - the data used by the system that needs to be entered while the system is active
Processes - the tasks that need to be performed using the input data and any other previously stored data
Outputs - information that needs to be displayed or printed for the users of the system
Storage - data that needs to be stored in files in an appropriate medium for use in the future
What are the 3 methods used to design and construct a solution to a problem?
Structure diagrams
Flowcharts
Pseudocode
Describe structure diagrams.
Can be used to show top-down design in a diagrammatic form
Are hierarchical, showing how a computer system solution can be divided into sub-systems with each level giving a more detailed breakdown
Describe flowcharts.
Shows diagrammatically the steps required to complete a task and the order that they are to be performed. These steps, together with the order, are called an algorithm.
Describe Pseudocode as a method used to design a solution to a problem.
Simple method of showing an algorithm
Uses English key words similar to those used in a high level programming language
Pseudocode is not bound by the strict syntax rules of a programming language
Non-proportional font is used throughout
All keywords are written in capital letters
All names given to data items and subroutines start with a capital letter
Where conditional and loop statement are used, repeated or selected statements are indented by two spaces
What are the six operators of Pseudocode?
+ Add
- Subtract
* Multiply
/ Divide
^ Raise to the power
( ) Group
How are Pseudocode statements assigned?
With an arrow pointing to the left
Describe the two types of conditional statements.
IF… THEN… ELSE… ENDIF
A condition which can be true or false.
Can be set up with the use of a boolean variable (true or false) or by using comparison operators
CASE OF… OTHERWISE… ENDCASE
A choice between several different values.
What are the nine comparison operators in Pseudocode?
> Greater than
< Less than
= Equal
= Greater than or equal
<= Less than or equal
<> Not equal
AND Both
OR Either
NOT Not
Describe the three types of Pseudocode for iteration (looping).
FOR… TO… NEXT
A set number of repetitions.
REPEAT… UNTIL
A repetition, where the number of repeats is not known, that is completed at least once. Also known as a post-condition loop.
WHILE… DO… ENDWHILE
A repetition, where the number of repeats is not known, that may never be completed. Also known as a pre-condition loop.
Describe the Pseudocode used for input and output statements.
INPUT is used for data entry; usually followed by a variable where the data input is stored
OUTPUT is used to display information either on a screen or printed on paper; usually followed by a single value that is a string or a variable, or a list of values separated by commas