How julianomachados/t1_alest2 works
Pennywise is a command-line application that reads Derry region files and maintains the ten lowest-scoring children in a bounded max-heap. The user selects a region to load, can display the sorted ranking, clear it, request help, or exit. The heap performs insertion and eviction and creates a sorted result on demand. The region inputs are documented and referenced in Main; only the three runtime classes were sampled.
Main entry points: Main.java CLI and file reader · Top10Heap.java Top-10 heap · Crianca.java Child record · arquovosTexto Region files
Components 5
CLI workflow
- CLI and file reader
src/main/java/pennywise/Main.java - Region files
docs/arquovosTexto
Ranking core
- Top-10 heap
src/main/java/pennywise/Top10Heap.java - Child record
src/main/java/pennywise/Crianca.java
Other components
- User
Connections 9
- User → CLI and file reader: sends commands
- CLI and file reader → Region files: reads lines
- CLI and file reader → Child record: creates records
- CLI and file reader → Top-10 heap: inserts records
- CLI and file reader → Top-10 heap: requests ranking
- Top-10 heap → CLI and file reader: returns sorted list
- CLI and file reader → Top-10 heap: clears state
- CLI and file reader → User: displays results
- Top-10 heap → Child record: compares records