Create a class named Dunbar This class will have the followi

Create a class named Dunbar. This class will have the following characteristics: (10 points) Dunbar extends Argyll An instance variable named extent of type double A setter method for extent A method with header public double getExtendedForce() //that returns the extent times the square of the force.

Solution

Dunbar.java


public class Dunbar extends Argyll {
    private double extent;

    public void setExtent(double extent) {
        this.extent = extent;
    }

    public double getExtendedForce() {
        return this.extent * this.getQuadForce();
    }
}


Argyll.java


public class Argyll {

    private double force;

    public void setForce(double force) {
        this.force = force;
    }

    public double getQuadForce() {
        return Math.pow(force, 2);
    }

}

Create a class named Dunbar. This class will have the following characteristics: (10 points) Dunbar extends Argyll An instance variable named extent of type dou

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site