Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Full Notes - Chapter 20 - Further Programming - CIE Computer Science

Rating
-
Sold
-
Pages
8
Uploaded on
09-07-2026
Written in
2025/2026

Full notes for Chapter 20: Further Programming of the CIE A-Level Computer Science course (9618). Notes are written fully according to the specification and all past paper mark schemes.

Institution
Course

Content preview

​20. Further Programming​

​1. Basics of OOP​

​ bject-oriented programming is organising the code behind programs to reflect the behaviours and​
O
​characteristics of objects in the real world​

​Key terms:​
​●​ ​Properties/attributes - the data items/attributes/characteristics and data types defined in a class​
​●​ ​Methods - the procedures/functions/instructions in a class, which implement the behaviours of​
​the object and act on the properties/attributes​
​●​ ​Class - a blueprint to create objects from, which defines the attributes and methods​
​●​ ​Object - a specific instance that implements the class​
​●​ ​Instance/instantiation - an occurrence of an object created in memory​

​ ote: no memory is allocated when a class is defined, but objects are allocated memory space whenever​
N
​they are created/instantiated​

​ constructor method is the method that is called automatically when an object is created, used to​
A
​initialise an object from a class​
​●​ ​In Python, it is the init method​

​Encapsulation:​
​●​ ​Wrapping properties/attributes and methods into a single entity (the class/object) to ensure​
​sensitive data is protected/hidden from users​
​●​ ​Attributes should only be accessed (retrieved/modified) using methods that are contained​
​(encapsulated) within the class definition​

​Getter and setter methods:​
​●​ ​Data should never be accessed directly e.g. using player1.name()​
​●​ ​Instead, getter and setter methods must be provided, encapsulated within the class definition,​
​that will allow access to return/update attributes​
​●​ ​Getter methods e.g. getName() return the value of an attribute/property​
​●​ ​Setter methods let you change/update the value of an attribute/property​

​OOP is useful because:​
​●​ ​Modularity - code can be broken down into smaller, more manageable pieces, making it easier to​
​understand/test/maintain, and better collaboration as different people can work on each module​
​●​ ​Reusability - many objects can be defined from the same class, saving development time​
​●​ ​Encapsulation/data hiding - data can be protected within classes with external access restricted​
​●​ ​Inheritance/polymorphism - classes can be derived from existing classes, saving development​
​time, and polymorphism allows for greater flexibility​

, ​2a. Inheritance​

​Inheritance:​
​●​ ​Inheritance is when a class (subclass) is derived from another class (superclass/parent class), and​
​the methods and properties/attributes of the superclass are made available to the derived class​
​●​ ​The subclass may also have its own additional attributes/methods (as well as the ones inherited)​
​●​ ​The attributes/methods derived from the superclass can also be extended/modified/overridden​
​●​ ​On diagrams, the arrow points towards the superclass​
​●​ ​In Python, the subclass is created as follows:​
class SwimmingBird(Bird):​

def __init__(self, c, a):​

super(SwimmingBird, self).__init__(c,a)​


​Polymorphism & overriding:​
​●​ ​When methods with the same name behave differently in derived/inherited classes/subclasses​
​●​ ​A way to do this is using overriding - when a method with the same identifier/name in the​
​superclass is redefined or extended in a subclass​


​2b. Access Modifiers​

​Access modifiers:​
​●​ ​Way of making attributes and methods private, public or protected​
​●​ ​By default, attributes/methods are public​​(+)​​and​​can be accessed outside of the class they are in​
​●​ ​Private​​(-)​​attributes and methods are not available​​throughout the entire program and are only​
​accessible using (getter/setter) methods within the class - done to prevent unauthorised access to​
​data/keep data hidden and enforce encapsulation​
​○​ ​In Python, attributes/methods are made private using a double underscore, as follows:​
class Bird:​

def __init__(self, colour, age):​

self.__featherColour = colour​

self.age = age​

def __fly(self):​

print(“Bird flying”)​

​In above e.g. featherColour and fly method would be private, but age would be public​
​●​ ​Protected​​(#)​​attributes/methods are used in inheritance,​​and they are only available to the class​
​they are in and the classes that inherit it, but not from anywhere else outside those classes​
​○​ ​In Python, one underscore is used to make attributes/methods protected, as follows:​
class Animal:​

def __init__(self, s, n):​

self._state = s​

self._size = n​

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
July 9, 2026
Number of pages
8
Written in
2025/2026
Type
SUMMARY

Subjects

$8.96
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
benjaminskn18

Get to know the seller

Seller avatar
benjaminskn18 UCS
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 days
Number of followers
0
Documents
21
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions