How ariskycode/geektrust-ledger-company works
Main Components
a. Input Processing Layer
• Command Parser (handles ALLOT_WATER, ADD_GUESTS, BILL commands)
• File Input Handler (processes input files)
b. Core Domain Layer
• Apartment Management
• Apartment Types (2BHK, 3BHK)
• Water Allocation Calculator
• Guest Management
• Guest Tracker
• Additional Water Calculator
• Billing System
• Corporation Water Calculator
• Borewell Water Calculator
• Tanker Water Calculator
• Total Bill Calculator
c. Output Layer
• Bill Formatter
• Console Output Handler
Key Relationships to Highlight
• Input File → Command Parser → Apartment Management
• ↓
• Water Allocation
• ↓
• Guest Management
• ↓
• Billing System
• ↓
• Output Handler
Important Details
• Water allocation ratios
• Pricing tiers for different water types
• Guest calculation flow
• Bill calculation pipeline
Technical Specifications to Note
• Java-based implementation
• Command-line interface
• File-based input system
• Maven build system
Design Patterns to Highlight
• Command Pattern (for handling different input commands)
• Strategy Pattern (for different water pricing calculations)
• Factory Pattern (for creating appropriate apartment types)
• Any abbreviations or special symbols
This design should emphasize the separation of concerns between:
• Input processing
• Business logic
• Calculation engines
• Output formatting