Trying to use polymorphism, need some corrections : <p>So I am using the superclass Vehicle and subclass Van. The Van subclass inherits horsepower, weight, and aerodynamics from the superclass. I have also defined a new instance variable in Van called carryweight. When I try to run TestAcceleration.java I get this error:</p>

<p><a href="https://i.stack.imgur.com/yEDcg.png" rel="nofollow noreferrer">java error</a></p>

<p>Here is the code:</p>

<p>VEHICLE SUPERCLASS</p>

<pre><code>public class Vehicle
{
public double horsepower;
public double aerodynamics;
public double weight;

public Vehicle(double hp, double w, double ad)
{
    horsepower = hp;
weight = w; 
aerodynamics = ad;
}

public double getHorsepower()
{
    return horsepower;
}

public double getAerodynamics()
{
    return aerodynamics;
}

public double getWeight()
{
    return weight;
}

public double acceleration()
{
double calcAccel = (100/horsepower)*aerodynamics*weight/100;
double roundAccel = Math.round(calcAccel * 100.0) / 100.0;
return roundAccel;
}
}
</code></pre>

<p>VAN SUBCLASS</p>

<pre><code>public class Van extends Vehicle
{
public double carryweight;

public Van(double hp, double w, double ad, double cw)
{
super(hp, w, ad, cw);
carryweight = cw;
}

public double getCarryweight()
{
    return carryweight;
}

public double acceleration()
{
double calcAccel = (100/horsepower)*(aerodynamics/2)*weight/100;
double roundAccel = Math.round(calcAccel * 100.0) / 100.0;
return roundAccel;
}
}
</code></pre>

<p>TESTACCELERATION CLASS</p>

<pre><code>public class TestAcceleration
{
public static void main (String[] args)
{

Vehicle car1 = new Van(100, 3500, 0.9, 160.4);

System.out.println(car1.acceleration());

}
}
</code></pre>
