FourMethods

Write a program FourMethods.java that has a main() and four other methods as described below. The main() program call the four methods as needed and display the results.

Extension

How could we modify these methods to calculate and print the area of a rectangle, where the lengths of the two sides are different? Java only allows a single return value from a method, so we can't return both length and width.

HINT: Is there some way that we can encapsulate those two values into a single object? An Array or ArrayList could be used to hold the two values, or a Pair object could store the two values.