What information has been abstracted in this diagram?
Distance betweeen components, component size, what the components look like
What is meant by abstraction?
Removal on unnecessary details
What is meant by data abstraction?
The details of how the data is actually being stored is hidden
Give some examples of abtracted data types
queue, stack, binary tree, linked list, record
In a graph, what are the lines connecting nodes known as?
Edges
In a graph edges connect to what?
Nodes
What types of data have been abstracted from this map?
Distances between stops, geographical features, buildings...
What is meant by problem abstraction?
Remove the constraints until the problem is easier to solve, eventually it will already have been solved before
What is functional abstraction?
hiding particular computational methods from the reat of the solution
A taxi driver has been asked to travel from point A, in London, to point B, what type of data could the taxi driver abstract?
Weather conditions, geographical features (hills), number of people in the taxi
What is computational thinking
Reasoning how a computer might solve a problem
When creating a racing car simulation, what kind of information could be abstracted?
Number of spectators, other racing cars, fuel capacity
Why reuse program components
pre-tested therefore error free, saves programming time
What is meant by a precondition?
A requirement that must be true for the code to run
What are some of the reasons to introduce preconditions?
To be able to validate inputs before code runs, to ensure that paramaters contain valid data, to inform programmers what data is expected by a routine, helps reusablility
What is meant by caching?
Storing data, so that furture requests for that data are faster e.g. data from a webpage
Why cache data?
Because data is saved, it speeds up processing
What are the advantages of caching?
Speeds up processing, reduces requests for data from secondary storage
How does RAM use caching?
The OS can retrieve the next set of instructions and cache them, in anticipation of their use
Which type of RAM is used when caching instructions? (Static or dynamic)
Static - doesn't need to be refreshed
Why not use cache all of the time?
Because the data/instructions may have changed, can take up unecessary room - on hard drive or RAM, can be slower if cached resource is not found
Can you name reusable program components?
Subrouines: procedures, functions or libraries
When creating a football game on a computer, what kind of information could be abstracted?
Weather conditions, spectator size, stadium capacity, names of players