Triangle Class Revisited
In summary, the Triangle class has two constructors and two instance methods: class Triangle extends Polygon { public Triangle() {…} public Triangle(…) {…} public void draw(…) {…} public void fill(…) {…} }
Now let’s see how we can use this class…