B3.1 Cumulative Paper 2 Checkpoint
Use the entire single-class OOP toolkit under reduced scaffolding and diagnose any remaining gaps before HL multiple-class OOP.
Less support, more independent recall
Rapid Recall Deck
Attempt each card first. If a term is new, flip and study it, then answer it again without looking. Mark only secure recall as “Know it”.
Design before implementation
confirm(), which adds one confirmed seat only when capacity remains, and spaces_left().Part A · Construct the UML
WorkshopSession ------------------------- organization_name workshop_title facilitator_name max_seats _confirmed ------------------------- confirm() spaces_left()
From UML to executable Python
Part B · Construct the class
Construct WorkshopSession from these requirements: organization_name is shared by all sessions; each object stores workshop_title, facilitator_name, max_seats and private _confirmed starting at 0. confirm() adds one seat only when capacity remains and returns whether it succeeded. spaces_left() returns the remaining seats.
class WorkshopSession:
organization_name = "City Learning Centre"
def __init__(self, workshop_title, facilitator_name, max_seats):
self.workshop_title = workshop_title
self.facilitator_name = facilitator_name
self.max_seats = max_seats
self._confirmed = 0
def confirm(self):
if self._confirmed < self.max_seats:
self._confirmed += 1
return True
return False
def spaces_left(self):
return self.max_seats - self._confirmedObject creation and information hiding
Part C · Instantiation
List the important operations when the following statement executes:
s1 = WorkshopSession("Robotics", "Nia", 2)
- A new
WorkshopSessionobject is created. __init__runs using the supplied arguments.- The object’s workshop title, facilitator name, maximum seats and initial confirmed count are initialized.
- The object reference is assigned to
s1.
Part D · Private state
Explain two consequences of treating _confirmed as private state.
Outside code is expected not to change it directly, so updates go through controlled class behaviour; this reduces accidental/invalid changes and helps protect the integrity of the capacity rule.
Can you diagnose class-vs-instance state?
class WorkshopSession:
organization_name = "City Learning Centre"
confirmed = 0
def __init__(self, workshop_title, facilitator_name, max_seats):
self.workshop_title = workshop_title
self.facilitator_name = facilitator_name
self.max_seats = max_seats
def confirm(self):
if WorkshopSession.confirmed < self.max_seats:
WorkshopSession.confirmed += 1Debug the design
Two session objects can have different confirmed-seat counts. Identify the OOP design error and state the correction.
confirmed is incorrectly a class variable, so all session objects share one count. It should be an instance variable such as self._confirmed = 0 initialized in __init__ and updated through self._confirmed.
Cumulative B3.1 practice
Independent Paper 2 mini-set
1. Evaluate the use of OOP for a booking system expected to grow to many workshops and users.
2. Construct a method cancel() that decreases _confirmed only when the count is greater than 0.
3. Explain why organization_name can reasonably be class-level while workshop_title should be instance-level.
- A strong evaluation balances modelling/reuse/maintenance against added class-design complexity and concludes that OOP is suitable for the growing workshop-management application.
def cancel(self): if self._confirmed > 0: self._confirmed -= 1- The organization name is genuinely shared across all sessions, while different session objects can represent different workshops and therefore need independent
workshop_titlestate.
Turn errors into the next practice target
Gap diagnosis
Which B3.1 skill currently needs the most work?
IA progress check
Show current Criterion D progress: one implemented feature, one test, and one piece of evidence you can document.
Finish the learning cycle
IA — main task
Continue Criterion D development/testing. Make sure your evidence log records what changed, why, and how you tested it.
Paper 2 — short practice
Redo only the checkpoint parts you missed today. Do not repeat secure sections just for volume.