[SOLVED] SOLVED: TriangleCollection

23.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (2 votes)

We will be using Triangle.java 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 “TriangleCollection.java”. 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 TriangleCollection.java and use the following program stored Assignment8.java, 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:

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.