Full interactive session - vladimirqaarchitect-lgtm/geometric-shape-manager GitHub Wiki
======= PROGRAM STARTS =======
--- MENU ---
- Add new shape
- List all shapes
- Show shape details
- Remove shape
- Sum of all areas
- Sum of all perimeters
- Find shape by color
- Statistics
- Save to file (JSON)
- Load from file (JSON)
- Exit
Choose an option: 1
========== OPTION 1: ADD NEW SHAPE (CIRCLE) ==========
choose a shape:
- Circle
- Rectangle
- Triangle
- Square
- Ellipse Enter shape number (1–5): 1
Enter a color: blue Enter radius: 7 Success: Shape added!
========== MENU AGAIN ==========
--- MENU ---
- Add new shape
- List all shapes
- Show shape details
- Remove shape
- Sum of all areas
- Sum of all perimeters
- Find shape by color
- Statistics
- Save to file (JSON)
- Load from file (JSON)
- Exit
Choose an option: 1
========== OPTION 1: ADD NEW SHAPE (RECTANGLE) ==========
choose a shape:
- Circle
- Rectangle
- Triangle
- Square
- Ellipse Enter shape number (1–5): 2
Enter a color: green Enter width: 10 Enter height: 5 Success: Shape added!
========== MENU AGAIN ==========
--- MENU --- ... Choose an option: 1
========== OPTION 1: ADD NEW SHAPE (TRIANGLE) ==========
choose a shape:
- Circle
- Rectangle
- Triangle
- Square
- Ellipse Enter shape number (1–5): 3
Enter a color: yellow Enter side a: 3 Enter side b: 4 Enter side c: 5 Success: Shape added!
========== MENU AGAIN ==========
--- MENU --- ... Choose an option: 1
========== OPTION 1: ADD NEW SHAPE (SQUARE) ==========
choose a shape:
- Circle
- Rectangle
- Triangle
- Square
- Ellipse Enter shape number (1–5): 4
Enter a color: red Enter side: 2 Success: Shape added!
========== MENU AGAIN ==========
--- MENU --- ... Choose an option: 1
========== OPTION 1: ADD NEW SHAPE (ELLIPSE) ==========
choose a shape:
- Circle
- Rectangle
- Triangle
- Square
- Ellipse Enter shape number (1–5): 5
Enter a color: purple Enter a (semi-major axis): 4 Enter b (semi-minor axis): 2 Success: Shape added!
========== OPTION 2: LIST ALL SHAPES ==========
--- MENU --- ... Choose an option: 2
--- ALL SHAPES ---
- Circle (blue) | R: 7.0
- Rectangle (green) | 10.0 x 5.0
- Triangle (yellow) | Sides: 3.0, 4.0, 5.0
- Square (red) | 2.0 x 2.0
- Ellipse (purple) | a: 4.0, b: 2.0
========== OPTION 3: SHOW SHAPE DETAILS ==========
--- MENU --- ... Choose an option: 3
--- SHAPE DETAILS --- Enter shape number (1-5): 1
Info: Circle (blue) | R: 7.0 Area: 153.94 Perimeter: 43.98
========== OPTION 7: FIND SHAPES BY COLOR (case-insensitive) ==========
--- MENU --- ... Choose an option: 7
Enter a color to search: BLUE
--- Shapes with color: blue ---
- Circle (blue) | R: 7.0
========== OPTION 8: STATISTICS ==========
--- MENU --- ... Choose an option: 8
--- STATISTICS --- Total shapes: 5 Circles: 1 Rectangles: 1 Squares: 1 Triangles: 1 Ellipses: 1 Average area: ... Average perimeter: ...
========== OPTION 5: SUM OF ALL AREAS ==========
--- MENU --- ... Choose an option: 5
Total Area of 5 shapes: ...
========== OPTION 6: SUM OF ALL PERIMETERS ==========
--- MENU --- ... Choose an option: 6
Total Perimeter of 5 shapes: ...
========== OPTION 4: REMOVE SHAPE ==========
--- MENU --- ... Choose an option: 4
--- REMOVE SHAPE --- Enter shape number to remove (1-5): 2
Success: removed: Rectangle (green) | 10.0 x 5.0
========== OPTION 2: LIST ALL SHAPES (AFTER REMOVE) ==========
--- MENU --- ... Choose an option: 2
--- ALL SHAPES ---
- Circle (blue) | R: 7.0
- Triangle (yellow) | Sides: 3.0, 4.0, 5.0
- Square (red) | 2.0 x 2.0
- Ellipse (purple) | a: 4.0, b: 2.0
========== OPTION 9: SAVE TO FILE (JSON) ==========
--- MENU --- ... Choose an option: 9
Enter a file name to save: shapes.json Success: Saved 4 shapes to shapes.json
========== OPTION 10: LOAD FROM FILE (JSON) ==========
--- MENU --- ... Choose an option: 10
Enter a file name to load: shapes.json Success: Loaded 4 shapes from shapes.json
========== OPTION 11: EXIT ==========
--- MENU --- ... Choose an option: 11
Goodbye!