This is a simple console-based C# application that allows users to manage circles and rectangles. The program provides functionalities to add new shapes, list existing shapes, and calculate various statistics like the total area and the percentage of area occupied by circles and rectangles.
The system allows the user to:
- Add circles with specified diameters.
- Add rectangles with specified height and width.
- List all shapes in ascending order by their unique IDs.
- View statistics like the total number of shapes, total area, and area percentages occupied by circles and rectangles.
- Add a Circle: Allows the user to input the diameter and creates a new circle.
- Add a Rectangle: Allows the user to input the height and width and creates a new rectangle.
- List Items: Lists all the circles and rectangles sorted by their IDs.
- Get Statistics: Displays total shapes, total area, and area percentages for circles and rectangles.
- Exit: Exits the program.
- Id: A unique identifier for each circle.
- Diameter: The diameter of the circle.
- Area(): Calculates and returns the area of the circle.
- Display(): Displays the circle’s information.
- Id: A unique identifier for each rectangle.
- Height: The height of the rectangle.
- Width: The width of the rectangle.
- Area(): Calculates and returns the area of the rectangle.
- Display(): Displays the rectangle’s information.
- Main entry point of the application.
- Provides a menu-driven interface for the user to interact with the system.
- Clone the repository or download the files to your local machine.
- Open the project in Visual Studio or your preferred C# IDE.
- Build and run the program.
- Use the menu options to interact with the application:
- Select option 1 to add a circle.
- Select option 2 to add a rectangle.
- Select option 3 to list all the shapes.
- Select option 4 to view statistics.
- Select option 5 to exit the program.