This desktop application is a functional ATM simulation built with Java and the Swing framework, designed to demonstrate the integration of graphical user interfaces with complex backend logic. The system manages a virtual inventory of banknotes across multiple denominations—including 200, 100, 50, 20, and 10 UAH—using a greedy algorithm to calculate the most efficient dispensing strategy for any requested amount. Beyond simple cash withdrawal, the engine features robust data validation to handle non-numeric entries, negative values, and scenarios where the machine has insufficient total funds or lacks the specific bill types required for an exact amount. The interface, organized via standard layout managers, provides real-time feedback by displaying a detailed breakdown of the bills dispensed and the remaining balance in the ATM's vault after each successful operation. By utilizing Java Collections such as HashMap for inventory and TreeMap for sorted processing, the project serves as a practical example of object-oriented programming and state management in a desktop environment.
hn9lth7/atm-simulator-java
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|