Question 3
public class geometricObject {
public int numSides; // number of sides of the object
private String color; // color of the object
public geometricObject (int sides, String c) {
numSides = sides;
color = c;
}
public String getColor () {
return color;
}
}
Previous slide
Next slide
Back to first slide
View graphic version