APDR

Advanced Object-Oriented Programming Lab

Algorithms, Programming, and Data Representation · Module 92313 · Chapter 1011a

Predict what Python will share, find, bind, or create. Each experiment reveals the rule behind the result, then lets you explore the same mechanism.

How the lab works

  1. Predict. Choose an answer before the trace runs.
  2. Rate your confidence. A sure but wrong prediction marks an idea to revisit.
  3. Reveal. Follow the object or lookup trace.
  4. Explore. Open the sandbox at any time and change the rule; each completed experiment adds one lab skill.

10.1 References and copying

Follow names to objects and compare a shallow copy with a recursive one.

The reference trace appears here.

Explore a copy rule

10.2 Slots and attribute lookup

Compare the winning value when class descriptors and instance attributes share a name.

The attribute lookup appears here.

Explore an attribute rule

10.3 Protocols and substitution

Test whether structure, runtime checks, and behavioural promises are being confused.

The interface contract appears here.

Explore a contract

10.4 C3 and cooperative inheritance

Trace the constraints that produce a predictable order through a diamond.

The inheritance order appears here.

Explore an MRO case

10.5 Descriptors and class hooks

See what a function, property, or class hook receives during access or creation.

The descriptor rule appears here.

Explore a descriptor

11.2–11.3 Patterns and runtime traps

Choose a collaboration pattern, then trace when definitions capture their values.

The design decision appears here.

Explore a design rule

Your results

Personal study lab based on the Chapter 1011a guide and supplied “1011a.pdf”, written in my own words. Not an official FAU publication; check course details against the current notes. Made by Thanate Amornjiraporn (Focus).