AP CSA

Inheritance To facts …

Topic Basic Intermediate Advanced
Mechanics
Understand the concept of a class hierarchy
Use the 'extends' keyword to establish inheritance relationships
Recognize that a class can extend only one superclass
Explain the 'is-a' relationship in inheritance
Understand that all classes implicitly extend Object if no other superclass is specified
Identify common attributes and behaviors to place in a superclass
Discuss the trade-offs between inheritance and composition
Understand the implications of the 'Object' class being the root of all class hierarchies
Implement and use abstract classes in a class hierarchy
Constructors in inheritance hierarchies
Understand that constructors are not inherited
Know that every constructor must call a superclass constructor as its first action
Use the 'super' keyword to explicitly call a superclass constructor
Understand implicit calls to the no-argument superclass constructor
Explain the process of constructor chaining up to Object
Handle complex initialization scenarios in multi-level inheritance
Inherited methods
Understand that subclasses inherit public methods from superclasses
Override inherited methods in subclasses
Use the '@Override' annotation when overriding methods
Call the superclass version of an overridden method using 'super'
Understand the rules of method overriding (e.g., return type covariance)
Discuss the implications of overriding methods like equals() and hashCode()
Types and inheritance
Understand that a subclass object can be used wherever a superclass object is expected
Use superclass reference variables to refer to subclass objects
Explain what “polymorphism” means.
Explain how polymorphism allows for code flexibility and extensibility
Understand the difference between compile-time and run-time types
Discuss the implications of polymorphism on method invocation
Understand the concept of dynamic method dispatch
Method overriding and polymorphism
Understand that overridden methods are called based on the actual object type, not the reference type
Recognize that only instance methods can be overridden
Explain how polymorphism works with method overriding
Understand the difference between method overriding and method overloading
Discuss the implications of polymorphism on system design
Understand how polymorphism supports the 'Open-Closed Principle' in OOP