How rajyash1904/atm-machine works
Project type and purpose
• This is a small, console-based Java application that simulates an ATM machine.
• Its purpose is to allow a user to deposit, withdraw, and view a bank account’s balance via a command-line interface.
File structure
• Top-level files:
• README.md – describes the project, features, and usage
• Jenkinsfile – pipeline definition for CI
• .gitignore, LICENSE, .project – metadata and IDE config
• ATM/ directory:
• ATM.java – entry-point class with main()
• Account.java – domain model for a bank account
• OptionMenu.java – CLI UI and menu logic
README for additional insights
• Confirms Java 8+ requirement
• Describes three core operations: deposit, withdraw, view balance
• No external database or network services—data is held in memory
a. Main components
• ATM Application (ATM.java) – initializes the program
• Menu/UI Layer (OptionMenu.java) – handles user prompts and input
• Business Model (Account.java) – holds account state and operations
• In-Memory Data Store – simple Java objects in runtime
• CI Pipeline (Jenkins) – builds and (potentially) tests the code on each commit
b. Relationships & data flow
• ATM.main() → creates OptionMenu instance
• OptionMenu prompts user → invokes Account.deposit()/ withdraw()/getBalance()
• Account updates its internal state → returns results to OptionMenu
• OptionMenu displays updated balance or error messages
• Jenkins triggers on Git commits → checks out code → runs javac → reports status
c. Architectural patterns / principles
• Single-process, layered approach: UI layer vs. domain layer
• Separation of concerns:
– ATM.java owns application launch
– OptionMenu.java owns interaction flow
– Account.java owns business logic and state
• No external persistence—ideal for extension to a database if needed
d. Key technologies and frameworks
• Java 8+ (JDK)
• Jenkins (defined in Jenkinsfile) for CI
• Standard Java libraries (no third-party dependencies)