2.1.1Thinking abstractly +2.1.2 Thinking ahead Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Abstraction

A

Hiding unnecessary detail and showing details that are important in context.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Inputs

A

What the system needs to process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Outputs

A

What the system should produce.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Preconditions

A

Conditions that already exist and could affect how you devise a solution to a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Subroutines, Procedures, functions and methods

A

Blocks of code that perform a task and can be reused multiple times.​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Caching

A

Storing instructions or values in cache memory after they have been used, as they
may be used again. Results in faster retrieval times, as instructions or data don’t need to be fetched from secondary storage, which is much slower.​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Prefetching

A

Data being requested from main memory by the processor before it is required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Procedural abstraction

A

The process of breaking down problems into smaller more manageable steps​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Data abstraction

A

a form of abstraction in which details about how data is being stored are hidden

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Functional abstraction

A

the implementation detail of the computational method is hidden​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Problem abstraction

A

the process of filtering out - ignoring - the characteristics of problems that are not needed in order to concentrate on those that are needed​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The difference between abstraction and reality

A

● Abstraction is a simplified representation of reality
● Real-world values can be stored as variables and constants
● Objects in object-oriented programming are an abstraction for real-world entities
○ Attributes represent the characteristics of an object
○ Methods represent the actions a real-world object is able to perform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

2 advantages of abstraction

A

-easier for programmers to focus on the core elements
-reduces the time needed to be spent on the project
-prevents programs from getting unnecessarily large

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is representational abstraction

A

a technique in which excessive details are removed to arrive at a representation of a problem that consists of only the key features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what form of abstraction involves grouping together similarities within a problem to identify what kind of problem it is

A

abstraction by generalisation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what kind of problems make use of multiple levels of abstraction

A

large complex problems

16
Q

give two applications of layers of abstraction

A

-Networking(TCP/IP)
-programming languages

17
Q

state 2 advantages of using abstraction in programming languages

A

-easier to remember syntax in high level languages as it is closer to natural language
-coding becomes accessible to beginners

18
Q

how does object oriented programming use abstraction

A

-objects are an abstraction for real world entities.
-Attributes are an abstraction for the characteristics of an object.
-methods are an abstraction for the actions a real world object is able to perform

19
Q

what is the purpose of thinking ahead

A

to make programs easy and intuitive for users to use

20
Q

what three considerations do programmers need to make inputs and outputs when thinking ahead

A

-method of input/output
-data structures used
-data types used
-order of data

21
Q

where can pre-conditions be defined

A

within the code or within documents

22
Q

give an example where preconditions are required

A

-stack functions
check that the stack is not empty when popping an element from a stack.
check that a stack is not full when pushing an element onto a stack
-Factorial function
the number passed to the function cannot be negative

23
Q

state two advantages of including preconditions within the documentation accompanying a subroutine

A

-reduces the length of the problem
-reduces the complexity of the program
-saves time needed to debug and maintain a longer program
-makes subroutine more reusable

24
Q

how is caching used to store web pages

A

web pages that a user frequently accesses are cached, so the next time one of these pages is accessed, content can be loaded without delay

25
Q

what are the advantages of caching web pages

A

-content can be loaded without delay
-images and text don’t have to be downloaded again multiple times
-frees bandwidth for other tasks on a network
-less time is spent waiting

26
Q

give a limitation of caching

A

-accuracy of algorithm used
-effectivness of algorithm in managing the cache
-size of the cache

26
Q

Give 3 advantages of using reusable program components

A

-more reliable than new components. As they have already been tested

-as developing from scratch is not required, this saves time, money and resources

26
Q

Give two examples of reusable programs

A

-abstract data structures
-classes
-subroutines