APDR

Object-Oriented Programming Lab

Algorithms, Programming, and Data Representation · Module 92313 · Chapter 10

Predict first, then reveal what Python binds and how a class interface shapes an object’s behaviour.

How the lab works

  1. Predict. Choose an answer and confidence.
  2. Reveal. Follow the object trace and explanation.
  3. Explore. Change the example after answering the fixed challenges.

10.1 Object abstraction

Separate an object’s representation from its public interface.

The object trace appears here.

Or explore

10.2–10.3 Classes and instances

Trace which values belong to the class and which belong to each instance.

The object trace appears here.

Or explore

10.4 Method dispatch

Predict the arguments Python binds when a method is called.

The object trace appears here.

Or explore

10.5 String representation

Check what a custom string method returns to print.

The object trace appears here.

Or explore

10.6 Special methods

Match familiar Python syntax to the method that defines its behaviour.

The object trace appears here.

Or explore

10.7 Fraction interface

Trace fraction data and the steps in an operation.

The object trace appears here.

Or explore

Your results

Based on the Chapter 10 guide and supplied lecture slides, rewritten in my own words. Not an official FAU publication. Made by Thanate Amornjiraporn (Focus).