Full interactive session - vladimirqaarchitect-lgtm/geometric-shape-manager GitHub Wiki

======= PROGRAM STARTS =======

--- MENU ---

  1. Add new shape
  2. List all shapes
  3. Show shape details
  4. Remove shape
  5. Sum of all areas
  6. Sum of all perimeters
  7. Find shape by color
  8. Statistics
  9. Save to file (JSON)
  10. Load from file (JSON)
  11. Exit

Choose an option: 1

========== OPTION 1: ADD NEW SHAPE (CIRCLE) ==========

choose a shape:

  1. Circle
  2. Rectangle
  3. Triangle
  4. Square
  5. Ellipse Enter shape number (1–5): 1

Enter a color: blue Enter radius: 7 Success: Shape added!

========== MENU AGAIN ==========

--- MENU ---

  1. Add new shape
  2. List all shapes
  3. Show shape details
  4. Remove shape
  5. Sum of all areas
  6. Sum of all perimeters
  7. Find shape by color
  8. Statistics
  9. Save to file (JSON)
  10. Load from file (JSON)
  11. Exit

Choose an option: 1

========== OPTION 1: ADD NEW SHAPE (RECTANGLE) ==========

choose a shape:

  1. Circle
  2. Rectangle
  3. Triangle
  4. Square
  5. 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:

  1. Circle
  2. Rectangle
  3. Triangle
  4. Square
  5. 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:

  1. Circle
  2. Rectangle
  3. Triangle
  4. Square
  5. 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:

  1. Circle
  2. Rectangle
  3. Triangle
  4. Square
  5. 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 ---

  1. Circle (blue) | R: 7.0
  2. Rectangle (green) | 10.0 x 5.0
  3. Triangle (yellow) | Sides: 3.0, 4.0, 5.0
  4. Square (red) | 2.0 x 2.0
  5. 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 ---

  1. 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 ---

  1. Circle (blue) | R: 7.0
  2. Triangle (yellow) | Sides: 3.0, 4.0, 5.0
  3. Square (red) | 2.0 x 2.0
  4. 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!