This Java application efficiently calculates the perimeter and area of squares, rectangles, triangles, and circles.
- Calculate perimeter and area for various shapes.
- Support for squares, rectangles, triangles, and circles.
- User-friendly graphical user interface (GUI).
- Clear and concise output.
- Clone the repository to your local machine.
- Open the project in your preferred Java IDE.
- Build and run the
Tester
class.
- Select whether you want to calculate the area or perimeter from the dropdown menu.
- Choose the type of polygon you want to calculate the area or perimeter for from the second dropdown menu.
- Enter the required dimensions in the provided input fields.
- Click the "Calculate" button to obtain the result.
- To clear the input fields, click the "Clear" button.
- To exit the application, click the "Exit" button.
- Square: Calculate area and perimeter by providing the length of one side.
- Rectangle: Calculate area and perimeter by providing the length and width.
- Triangle: Calculate area and perimeter by providing the lengths of all three sides.
- Circle: Calculate area and perimeter by providing the radius.
- Shape: An abstract class representing a geometric shape with methods to calculate area and perimeter.
- Square: A concrete class representing a square, extending the
Shape
class. - Rectangle: A concrete class representing a rectangle, extending the
Shape
class. - Triangle: A concrete class representing a triangle, extending the
Shape
class. - Circle: A concrete class representing a circle, extending the
Shape
class.