Example 1-Picture Frames-Objects-Solution:
Create a project with two classes (files), the main class "Frames for Pictures" with the main method and the second class "PictureFrame", which actually represents a rectangle with the necessary data (class properties), side and area.
The "PictureFrame" class should look like the picture:
The "PictureFrame" class should look like the picture:
In the main class, you need to create objects, enter the lengths and widths of the frames, calculate the areas and display them on the screen. The main class should look like the following image: