Question SOLVED:

Question SOLVED:

Final Programming Test

You have to create a program that can compute the Surface Area and Volumes of various containers

that are all "Right Prisms". This means that the ends of the container are identical and the sides are

perpendicular to the ends. Each of your containers has different shapes: Circular, Rectangular,

Triangular, and Regular Polygon. All of these containers are derived from a common abstract Container


You will then create a class called ContainerCollection which will contain an array of all of the possible

Container classes. This class will provide methods to compute the totalVolume and the totalSurfaceArea

of all Containers in the ContainerCollection.

The geometric equations for area and perimeter are provided for the required shapes as follows:

Perimeter Calculations (for your getTopPerimeter methods)
Powered by