SHARE
TWEET

Untitled

advictoriam Mar 4th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.    Represents a car.
  3. */
  4. public class Car extends Vehicle
  5. {
  6.    public Car(double purchasePrice)
  7.    {
  8.       super(purchasePrice);
  9.    }
  10.  
  11.    @Override
  12.    public double getValue()
  13.    {
  14.       double adjustedValue = super.getValue() - 0.25d * getMileage();
  15.       return (adjustedValue > 0) ? adjustedValue : 0;
  16.    }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top