2.1.1 Thinking Abstractly Flashcards
What is abstraction
Abstraction is the process of separating ideas from reality - in other words, hiding unnecessary detail and showing details that are important in context.
The need for abstraction
We often need to remove some details and highlight others to improve the clarity of what we are trying to convey.
2 advantages of abstraction
-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
state 2 advantages of using abstraction in programming languages
-easier to remember syntax in high level languages as it is closer to natural language
-coding becomes accessible to beginners
how does object oriented programming use abstraction
-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
The difference between abstraction and reality
• 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
give two applications of layers of abstraction
-Networking(TCP/IP)
-programming languages
give two applications of layers of abstraction
-Networking(TCP/IP)
-programming languages