Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hendrizzzz/computer-programming-2-midterms-groupproject2-perimeter-and-area-solver
A Java Swing application designed to calculate the perimeter and area of various polygons such as squares, rectangles, circles, and triangles.
https://github.com/hendrizzzz/computer-programming-2-midterms-groupproject2-perimeter-and-area-solver
abstraction javaswing
Last synced: 2 months ago
JSON representation
A Java Swing application designed to calculate the perimeter and area of various polygons such as squares, rectangles, circles, and triangles.
- Host: GitHub
- URL: https://github.com/hendrizzzz/computer-programming-2-midterms-groupproject2-perimeter-and-area-solver
- Owner: Hendrizzzz
- Created: 2024-04-08T08:03:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-18T15:10:11.000Z (8 months ago)
- Last Synced: 2024-08-29T12:01:21.308Z (5 months ago)
- Topics: abstraction, javaswing
- Language: Java
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Perimeter and Area Calculator
![image](https://github.com/Hendrizzzz/CS122-Midterms-GroupProject2/assets/139997209/c8acdabb-46c7-4d46-93b6-4051db42ae46)
## Overview
This Java application efficiently calculates the perimeter and area of squares, rectangles, triangles, and circles.## Features
- Calculate perimeter and area for various shapes.
- Support for squares, rectangles, triangles, and circles.
- User-friendly graphical user interface (GUI).
- Clear and concise output.## Installation
1. Clone the repository to your local machine.
2. Open the project in your preferred Java IDE.
3. Build and run the `Tester` class.## Usage
1. Select whether you want to calculate the area or perimeter from the dropdown menu.
2. Choose the type of polygon you want to calculate the area or perimeter for from the second dropdown menu.
3. Enter the required dimensions in the provided input fields.
4. Click the "Calculate" button to obtain the result.
5. To clear the input fields, click the "Clear" button.
6. To exit the application, click the "Exit" button.## Supported Shapes
- **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.## Classes
- **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.