2006 AP CSA FRQ 2: TaxableItem
Topic: Inheritance & Abstract Classes
Skills Tested: Abstract class extension, constructor chaining, method implementation, super keyword
Curriculum Alignment: Unit 3 (Class Creation) (2025-2026 AP CSA)
Points: 9 | Time Estimate: ~22 minutes
Part (a)
Write the purchasePrice method in TaxableItem that calculates the total price including tax.
Solution
public double purchasePrice()
{
double tax = getListPrice() * taxRate;
return getListPrice() + tax;
}
Part (b)
Write the complete Vehicle class that extends TaxableItem with cost, markup, and the ability to change markup.
Solution
public class Vehicle extends TaxableItem
{
private double cost, markup;
public Vehicle(double cost, double markup, double taxRate)
{
super(taxRate);
this.cost = cost;
this.markup = markup;
}
public double getListPrice()
{
return cost + markup;
}
public void changeMarkup(double newMarkup)
{
markup = newMarkup;
}
}
Key Concepts
Common Mistakes to Avoid
Official College Board Resources
About the Author: Tanner Crow is a certified AP Computer Science teacher with 11+ years of experience.
Last updated: January 2026