Flashcards
Unit 2
Cards in this deck (32)
- 1Computational thinkingThe ability to think logically about a problem and apply techniques for solving it
- 2Methods of problem solvingSimulation
Enumeration
Trial and error
Theoretical approach
Creative solution - 3SimulationThe process of designing a model of a real system in order to understand the behavior of the system
- 4Decrease and conquerFinding a solution of a sequence of smaller, related problems until the instance is small enough to be solved directly
- 5Algorithms can be implemented using:Sequence
Selection
Iteration - 6SequenceConsists of one or more statements following one after the other
- 7SelectionImplemented using IF... THEN... ELSE...
- 8IterationUses WHILE, FOR, REPEAT... UNTIL
- 9Structured programming uses:Top-down analysis for problem solving
Modularisation for program structure and organisation
Structured code for individual modules - 10Top-down design modelThe program is divided into modules, called from the main program
The modules can be broken down further
Hierarchy charts show this - 11Structured programming advantagesPrograms are broken down into modules, so they're written easier and faster
Each module can be tested individually
Take less time to test and debug
Easier to maintain - 12Programs solved by algorithmsRouting problems
Timetabling
Searching
Encrypting
Sorting
Writing a compiler - 13A good algorithm:Has clear and precisely stated steps
Should allow for invalid inputs
Must always terminate
Should be efficient
Should be designed so that others understand it - 14Tools for designing algorithms:Hierarchy charts
Flowcharts
Psedocode - 15Insertion sortIs efficient for sorting a small number of items by going through the lists and placing items in the right place
- 16Bubble sortIs useful for a small number of items
- 17Linear searchInefficient, searches every item in the list
- 18Binary searchUses divide and conquer to halve the search area in each pass
- 19Testing stagesModule testing
Program testing
System testing - 20A test plan:Must include normal, boundary and erroneous data
Must display test no., test data, purpose of test,expected outcome and actual outcome - 21Trace tables are used...to find errors
- 22Abstraction:Is the basis of computational thinking
- 23Information hidingAll details that aren't essential to solving the problem are omitted
- 24Problem abstractionRemoving details of the problem until it becomes one which has already been solved
- 25AutomationCreating models or simulations
- 26DecompositionBreaking problems down into
sub-problems - 27CompositionCombining procedures to form a compound procedure
- 28Procedural abstractionWriting procedures and passing parameters
- 29Functional abstractionKnowing how to call a function and what parameters to pass
- 30Data abstractionIs used to create and manipulate complex data structures
- 31A Finite State Machine with no output is a :Finite State Automaton
- 32State transition Tables:Are used as an alternative representation of FSM's
Information
- Description
- Flashcards on Unit 2, created by . . on 27/05/2019.
- Created by
- . .
- Views
- 2
- Rating