Please enable JavaScript.
Coggle requires JavaScript to display documents.
4.1 Abstraction & Automation (Abstraction (Representational…
4.1 Abstraction & Automation
Solve simple logic problems
10 logic puzzles
Task 3 was in last year's paper!
Follow and write algorithms
Algorithm: A sequence of steps that can be followed to complete a task and that always terminates.
Use the standard constructs: • sequence • assignment • selection • iteration.in pseudo-code to express the solution to a problem. do this for the Camel Task from the logic puzzles.
Be able to hand trace algorithms. Complete the 2 challenges:
Trace tables
Be able to articulate how a program works, arguing for its correctness and efficiency. Create python programs for the 2 challenges and then another student to describe.
Abstraction
Representational abstraction
is a representation arrived at by removing unnecessary details
Abstraction by generalisation or categorisatio
n is a grouping by common characteristics to arrive at a hierarchical relationship of the 'is a kind of' type.
Information hiding
: hiding all details of an object that do not contribute to its essential characteristics.
Procedural abstraction
: represents a computational method. The result of abstracting away the actual values used in any particular computation is a computational pattern or computational method - a procedure.
Functional abstraction
: the particular computation method is hidden. The result of a procedural abstraction is a procedure, not a function. To get a function requires yet another abstraction, which disregards the particular computation method. eg random.randint(1,101) in Python
Data abstraction
: details of how data is actually represented are hidden, allowing new kinds of data objects to be constructed from previously defined types of data objects.
Data abstraction is a methodology that enables us to isolate how a compound data object is used from the details of how it is constructed.
For example, a stack could be implemented as an array and a pointer for top of stack.
Problem abstraction/reduction
: details are removed until the problem is represented in a way that is possible to solve, because the problem reduces to one that has already been solved.
Decomposition
: procedural decomposition means breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task, which might itself be further subdivided.
Composition
: Build a composition abstraction by combining procedures to form compound procedures.
Build data abstractions by combining data objects to form compound data, for example tree data structure.
Automation
Requires putting models (abstraction of real world objects/ phenomena) into action to solve problems.
This is achieved by: • creating algorithms
• implementing the algorithms in program code
• implementing the models in data structures
• executing the code.