2.1.1 Thinking abstractly
Explain what is ment by representational abstraction
● Removing excessive details to represent a problem using only the key features
● Must analyse what is relevant to a scenario and simplify a problem based on this
2.1.1 Thinking abstractly
Explain what is ment by data abstraction.
● Details about how data is being stored are hidden.
● Programmers can use data structures without knowing how they are implemented.
2.1.1 Thinking abstractly
Explain what abstraction by generalisation is.
● Grouping together similarities within a problem to identify what kind of problem
● Allows problems to be categorised as being of a particular type
● A common solution can be used to solve these problems
2.1.1 Thinking abstractly
Explain what procedural abstraction is.
● Allows programmers to utilise functions without knowing how they are implemented
● Used in decomposition and manipulating data structures
● Models what a subroutine does without considering how, as once a subroutine has been written, it can be reused as a black-box
2.1.1 Thinking abstractly
What is the need for abstraction?
( generally )
● Abstraction allows non-experts to use of a range of systems or models by hiding information that is too complex or irrelevant to the system’s purpose
● Enables for efficient software design as programmers can focus on core elements
rather than unnecessary details
- Reduces the time spent on a project
- Prevents a program from getting unnecessarily large.
2.1.1 Thinking abstractly
Describe how abstraction is used within programming languages
2.1.1 Thinking abstractly
Explain how the TCP/IP model is a form of abstraction.
2.1.1 Thinking abstractly
Explain the difference between abstraction and reality
● Abstraction is a simplified representation of reality
● Entities are represented as computational structures eg. tables and databases
● Real-world values can be stored as variables and constants
● Objects in object-oriented programming are an abstraction for real-world entities
2.1.1 Thinking abstractly
What are some questions to consider when devising an abstract model.
2.1.1 Thinking ahead
Outline the benefits and drawbacks of caching
Benefits:
- Gives fast access to pages that have been recently looked up
- Saves having to download pages again, using up bandwith unnecessarily
Drawbacks:
- The cache may store an outdated version of data, leading to inconsistencies if the original source
- If the required data is not in the cache, the system must search for it in slower memory (e.g., RAM or disk), which can lead to slower performance than not using a cache at all.