We will be using file from the assignment 5. You need to add a few more methods to your class Triangle.
You will be creating a new class called TriangleCollection. This class should be defined in a file named
The class TriangleCollection will contain two instance variables only; a one dimensional array called
"collection " and a count to keep count of the number of Triangles in the collection.
The class TriangleCollection must include the following constructor and methods. (If your class does not
contain any of the following methods, points will be deducted. You can add more methods if you need to.
Save the TriangleCollection class in a file called and use the following program stored, which has the main method to test your class. Please study the code before writing your
class TriangleCollection. Here is the description for each option:
Powered by