Computational Thinking Skills (Copy)
Cheat Sheet: A Level Computer Science – Computational Thinking: Abstraction & Decomposition
1. Abstraction
Definition:
- Abstraction is the process of removing unnecessary detail and focusing only on the essential characteristics of a problem or system.
Purpose of Abstraction:
- To simplify complex problems
- To focus on relevant information and ignore irrelevant data
- To allow easier problem solving, generalisation, and reuse
Need for Abstraction:
- Real-world problems often contain excessive complexity
- Helps create a manageable model of the system
- Enables modular and efficient software design
Benefits of Abstraction:
- Reduces cognitive load
- Encourages code reusability
- Improves clarity and maintainability
- Allows focus on high-level logic rather than low-level implementation
Creating an Abstract Model:
- Identify key components (what the system must do)
- Exclude non-essential details
- Use diagrams, flowcharts, or pseudocode to represent the model
Example:
ATM System Abstract Model
Essential:
- Authenticate user
- Allow withdrawal, deposit, balance inquiry
- Print receipt
Not Included: - Internal wiring
- Brand of screen or card reader
- Color of buttons
2. Decomposition
Definition:
- Decomposition is the process of breaking down a complex problem into smaller, manageable sub-problems
Purpose of Decomposition:
- To simplify problem solving
- Allows individual components to be designed, tested, and implemented separately
- Forms the basis of modular programming
Benefits of Decomposition:
- Promotes code reusability via modules
- Easier to debug and maintain
- Supports collaborative development
- Enhances clarity and logical structure of programs
Relation to Program Modules:
- Each sub-problem can be implemented as a procedure or function
- Modules can be called independently and reused across the program
Example:
Decomposing a Ticket Booking System:
- User login/authentication
- Search for events
- Select seat and ticket type
- Process payment
- Generate and email ticket
Each part above would be developed as a separate function or procedure.
