Giter Club home page Giter Club logo

simple-atm-system's Introduction

Simple ATM system

Java application who simulate software on ATM. Application is able to create and delete accounts. It is also able to add income and transfer money to other accounts.

When creating accounts, Luhn algorithm is used to validate a credit card number.

Technology

  • Java 11
  • SQLite

To run application:

There are no any build automation tool used. We have to compile and run manually. :)

To compile files, navigate to the project root directory and run following command:

javac -cp ./libs/sqlite-jdbc-3.39.2.1.jar -d ./out/simple-atm-system -sourcepath . src/atm/.java src/atm//*.java

To run application, navigate to the project root directory and run following command:

java -cp ./libs/sqlite-jdbc-3.39.2.1.jar:./out/simple-atm-system atm.Main

Examples

The symbol > represents the user input.

Create and log into a new account:

1. Create account
2. Log into account
0. Exit
> 1

Your card has been created
Your card number:
4000007794531423
Your card PIN:
5423

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
XXX

Wrong card number or PIN!

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
5423

You have successfully logged in!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 0

Bye!

Check balance and add income to existing account:

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
5423

You have successfully logged in!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 1

Balance: 0

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 2

Enter income:
100
Income was added!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 1

Balance: 100

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 0

Bye!

Transfer money to another account:

1. Create account
2. Log into account
0. Exit
> 1

Your card has been created
Your card number:
4000007439330173
Your card PIN:
4419

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
5423

You have successfully logged in!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 3

Transfer
Enter card number:
4000007794531423
You can't transfer money to the same account!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 3

Transfer
Enter card number:
4000007439330174
Probably you made a mistake in the card number. Please try again!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 3

Transfer
Enter card number:
4000007439330173
Enter how much money you want to transfer:
200
Not enough money!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 3

Transfer
Enter card number:
4000007439330173
Enter how much money you want to transfer:
100
Success!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 1

Balance: 0

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 0

Bye!

Delete existing account:

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
5423

You have successfully logged in!

1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
> 4
The account has been closed!


You have successfully logged out!

1. Create account
2. Log into account
0. Exit
> 2

Enter your card number:
4000007794531423
Enter your PIN:
5423

Wrong card number or PIN!

1. Create account
2. Log into account
0. Exit
> 0

Bye!

Licence

License

simple-atm-system's People

Contributors

danijeldragicevic avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.