Basically I have an ArrayList of Objects. There are different types of objects, such as Triangles, Rectangles, and Spheres. Each object has its own method, such as getArea, getPerimeter, and getVolume. These methods are different for each object. How do I iterate through the ArrayList to print out all of the methods of each object?
So say I start with a Triangle. How do I print its getArea and getPerimeter methods with a for loop and a switch block / if statement?