Other 2006 FR Questions FR other years Be Prepared Home
A-2
Part (a)
  // returns the price of the item including the tax
  public double purchasePrice()
  {
    return getListPrice() * (1.0 + taxRate);
  }

Part (b)
public class Vehicle extends TaxableItem
{
  private double dealerCost;
  private double dealerMarkup;

  public Vehicle(double cost, double markup, double rate)
  {
    super(rate); 1
    dealerCost = cost;
    dealerMarkup = markup;
  }

  public double getListPrice()
  {
    return dealerCost + dealerMarkup;
  }

  public void changeMarkup(double markup)
  {
    dealerMarkup = markup;
  }
}
Notes:
  1. Must be the first statement


Other 2006 FR Questions | Back to Contents

Copyright © 2006 by Skylight Publishing
support@skylit.com