How sskeme/eeee346-f26-hw8 works
This small C++ homework program demonstrates dynamic binding for two shape types. The user selects a circle or rectangle and supplies its dimensions; main.cpp is intended to create the selected object through a Shape pointer and display it. Shape defines the abstract interface, while Circle and Rectangle provide the concrete measurements and display output. The excerpts contain TODOs in the main workflow and class definitions, so those intended connections are supported by the README rather than completed code.
Main entry points: main.cpp Program entry · shape.h Circle
Components 5
Other components
- User
- Program entry
main.cpp - Shape interface
shape.h - Circle
shape.h - Rectangle
shape.h
Connections 10
- User → Program entry: selects dimensions
README.md - Program entry → Circle: creates when selected
README.md - Program entry → Rectangle: creates otherwise
README.md - Program entry → Shape interface: uses pointer
README.md - Program entry → Circle: dispatches display
README.md - Program entry → Rectangle: dispatches display
README.md - Circle → Shape interface: inherits
shape.h - Rectangle → Shape interface: inherits
shape.h - Circle → Circle: display calls measurements
shape.h - Rectangle → Rectangle: display calls measurements
shape.h