This is a simple ATM (Automated Teller Machine) CLI application built using Kotlin and Gradle. It provides basic ATM operations via the command line.
- Java 21+ (Ensure
JAVA_HOMEis set correctly) - Gradle Wrapper (Run
./gradlewto avoid manual Gradle installation) - IDE (Optional): IntelliJ IDEA (Recommended)
-
Build the project and create JAR file:
./gradlew clean build
-
Run unit tests:
./gradlew clean test -
Run the application:
./gradlew clean bootRun --console=plain
-
Run the JAR manually:
java -jar build/libs/atm-simulator-{version}.jar
A shell script is provided to automate the build, test, and run process.
-
Make the script executable:
chmod +x start.sh
-
Run the script:
./start.sh
To push the project to GitHub:
git init
git add .
git commit -m "ATM simulator initial commit"
git remote add origin <your-repo-url>
git branch -M main
git push -u origin main-
login [name]- Logs in as this customer and creates the customer if not exist -
deposit [amount]- Deposits this amount to the logged in customer -
withdraw [amount]- Withdraws this amount from the logged in customer -
transfer [target] [amount]- Transfers this amount from the logged in customer to the target customer -
logout- Logs out of the current customer