Calling super with multiple arguments.
When the parent's method takes parameters, you pass them through — either with their original values or with subclass-specific tweaks.
super.method(arg1, arg2) works the same as super.method(), except it passes arguments to the parent's version. The same applies to super(arg1, arg2) in constructors.
This pattern matters when the parent's computation depends on its parameters — and the subclass wants to either reuse the same parameters or modify them before delegation.
On the AP exam, this appears in constructor chaining and in parameterized-method overrides.
Pass arguments to super() or super.method().
Same syntax as any method call — but with super as the receiver.
Constructor with multi-arg super
public class Rectangle {
private int width, height;
public Rectangle(int w, int h) {
width = w;
height = h;
}
public int area() { return width * height; }
}
public class ColoredRectangle extends Rectangle {
private String color;
public ColoredRectangle(int w, int h, String c) {
super(w, h); // pass width and height to Rectangle
color = c;
}
}
Method override with multi-arg super
public class Discount {
public double applyDiscount(double price, double percent) {
return price * (1 - percent / 100);
}
}
public class TaxedDiscount extends Discount {
private double taxRate;
public TaxedDiscount(double t) { taxRate = t; }
@Override
public double applyDiscount(double price, double percent) {
double afterDiscount = super.applyDiscount(price, percent);
return afterDiscount * (1 + taxRate / 100);
}
}
Modifying arguments before delegating
@Override
public double applyDiscount(double price, double percent) {
// give a 5% extra discount on top
return super.applyDiscount(price, percent + 5);
}
Multi-arg super vocabulary.
Used in constructor chaining and delegation.
- super(args) — parent constructor with arguments.
- super.method(args) — parent method with arguments.
- Constructor chaining — calling parent constructor from child.
- Argument forwarding — passing through parameters unchanged.
- Argument modification — adjusting parameters before delegating.
How multi-arg super is tested.
Constructor chaining is the most common context.
- Match the parent's signature exactly. Argument types and order.
- super() must be first line of constructor.
- Forward args or modify before passing. Both are valid patterns.
- Don't access parent's private fields directly. Use super calls instead.
Tax on top of discount.
Two-arg delegation.
Setup. Using the TaxedDiscount class above with taxRate = 10.
Call: applyDiscount(100, 20).
Step 1. super.applyDiscount(100, 20) returns 100 * 0.80 = 80.
Step 2. Apply 10% tax: 80 * 1.10 = 88.
Answer: 88.
Multi-arg super pitfalls.
Most are about signature and order.
- Wrong argument order or types. Compile error.
- super() not first in constructor. Compile error.
- Forgetting super() when no no-arg constructor exists. Compile error.
- Modifying args destructively. If you change a parameter, document why.
Multi-arg super at a glance.
Constructor vs method.
Multi-Arg Super Reference
AP Quick Reference| Form | Position | Purpose |
|---|---|---|
super(w, h) | First line of constructor | Init parent state. |
super.method(a, b) | Anywhere in method body | Delegate computation. |
| Modified args | Anywhere | Tweak before passing. |
How to master multi-arg super.
Signature match plus first-line rule.
- MCQ Practice — for each constructor, verify super() comes first and matches parent's signature.
- Java Lab — build Rectangle/ColoredRectangle. Test with various args.
- FRQ Practice — write the super() call as the first line; let the IDE warn you of compile issues.
Practice — attempt these now.
AP-style assessments aligned to this lesson. Time them.
AP CSA Unit 08 Topic 05 Overriding a Computation with a Two-Arg Super FRQ Practice
AP-style topic practice assessment