Write a program that displays the area (size of the surface) and perimeter (the distance around) of a rectangle with the width of 4.5 and height of 7.9 using the following formula:
area = width * height
Breaking it down
To make the program more reusable and modular we will define calculateAreaOfRectangle that accepts width and height of a triangle. Next from the main method we will call the method and set it to a local variable. Finally outputting and formatting the results.