Thinking Abstractly (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
11 cards from this deck
ShowHide
Practise the cards
11 cards from this deck
Definition of abstraction
Definition of abstraction
Reducing complexity by hiding unnecessary details to highlight essential features
3 types of abstraction
3 types of abstraction
Data, Procedural, Object-Oriented
Data abstraction
Data abstraction
Focuses on what data matters, hides how it's stored
Procedural abstraction
Procedural abstraction
Focuses on what function does, not how
Object-oriented abstraction
Object-oriented abstraction
Uses objects to model real-world entities, exposing only relevant data/behaviours
Abstraction benefit: complex systems
Abstraction benefit: complex systems
Breaks into simpler, understandable components
Abstraction benefit: reusability
Abstraction benefit: reusability
Abstract components reused in different projects
Abstraction benefit: maintainability
Abstraction benefit: maintainability
Changes to implementation don't affect abstract interface
Over-abstraction issue
Over-abstraction issue
Too many layers make system overly complex
Under-abstraction issue
Under-abstraction issue
Results in cluttered, repetitive code that's hard to maintain
Abstraction vs encapsulation
Abstraction vs encapsulation
Abstraction simplifies; encapsulation protects data
