2006 AP CSA FRQ 2: TaxableItem - Complete Solution

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.

Try It First! Attempt to solve this part before viewing the solution.

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

Abstract classes cannot be instantiated directly
Subclasses must implement abstract methods (getListPrice)
Use super(taxRate) to call parent constructor
Instance variables should be private with appropriate methods

Common Mistakes to Avoid

Forgetting to call super() in constructor
Not implementing the abstract getListPrice method
Accessing taxRate directly instead of through inherited behavior
Missing instance variable declarations

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

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]