public class ball { private double radius; private String type; public ball( ){ // sets radius as 1 and type as Football radius = 1; type = "football"; } public void setRadius(double radius){ this.radius = radius; } public void setType(String type){ this.type = type; } public boolean equals(ball otherBall){ // returns true if radius and type of this Ball and // otherBall have thesamevalues if(this.radius == otherBall.getRadius() && this.type == otherBall.getType()) return true; else return false; } public double getRadius( ){ return radius; } public String getType( ){ return type; } }