How srbalakkl/java-abstractclass works
This tiny Java example reads two integers, constructs a Square and a Circle, and prints each shape’s area. Shape supplies the abstract area contract and is the superclass of both concrete classes. The same file also declares an unused DuplicateShape abstraction; it is omitted because it does not participate in the runtime workflow.
Main entry points: Main.java Main
Components 6
Connections 6
- Console user → Main: enters integers
src/Main.java - Main → Square: constructs and calls
src/Main.java - Main → Circle: constructs and calls
src/Main.java - Square → Shape: extends
src/Main.java - Circle → Shape: extends
src/Main.java - Main → Console output: prints areas
src/Main.java