Revision and examination preparation (Grade 12 IT) – Week 2 focus
Download the Lessonotes Mobile South Africa app for faster lesson access on Android and iPhone.
Subject: Information Technology
Class: Grade 12
Term: Term 4
Week: 2
Theme: General lesson support
This page supports the lesson note with a companion video and a short classroom-ready summary.
For class groups and homework, share this lesson page so learners also get the summary, objectives, and full lesson context.
This week focuses on consolidating our understanding of crucial IT concepts that are fundamental for success in the final Matric IT examination. Effective revision is not just about re-reading notes; it's about actively engaging with the material, practicing problem-solving, and identifying areas needing further attention. In South Africa, a strong IT foundation opens doors to numerous career opportunities in the rapidly growing tech sector, from software development and data analysis to network administration and cybersecurity.
2.1 Object-Oriented Programming (OOP) OOP is a programming paradigm based on the concept of "objects," which contain data (attributes) and code (methods) that operate on that data.
The key principles of OOP are: Encapsulation: Bundling data and methods that operate on that data within a single unit (class). This protects data from outside access and misuse.
Think of it like a medical file: only authorized personnel can access the sensitive information inside.
Example:* Consider a `Car` class. It might have attributes like `colour`, `make`, and `model`. Methods could include `accelerate()`, `brake()`, and `change_gear()`. Encapsulation ensures that the car's speed can only be changed via the `accelerate()` and `brake()` methods, preventing direct, uncontrolled modification.
Inheritance: Allows you to create new classes (child classes or subclasses) based on existing classes (parent classes or superclasses). This promotes code reusability.
Imagine building a house: you can reuse the basic blueprint of a house and adapt it for a specific need.
Example:* We can create a `Taxi` class that inherits from the `Car` class. The `Taxi` class automatically inherits the `colour`, `make`, `model`, `accelerate()`, and `brake()` attributes and methods. We can then add specific attributes and methods relevant to taxis, such as `fare_per_km` and `calculate_fare()`.
Polymorphism: The ability of an object to take on many forms. This means that you can use the same method name to perform different actions depending on the object's type. Think of the command "start": a car, a computer, and a generator all "start," but each start differently.
Example:* Both a `Dog` class and a `Cat` class might have a `make_sound()` method.
However, when called on a `Dog` object, it would bark, and when called on a `Cat` object, it would meow.
Let's create a simple OOP example in Python related to managing student data in a South African school:
```python
class Student:
def __init__(self, name, student_id, grade):
self.name = name
self.student_id = student_id
self.grade = grade
self.marks = {} # Dictionary to store marks for different subjects
def add_mark(self, subject, mark):
self.marks[subject] = mark
def calculate_average(self):
if not self.marks:
return 0
total = sum(self.marks.values())
return total / len(self.marks)