Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanamlnk/simple-banking-system
Project created during Java Backend Developer track provided by Hyperskill
https://github.com/yanamlnk/simple-banking-system
gradle java sqlite
Last synced: 3 days ago
JSON representation
Project created during Java Backend Developer track provided by Hyperskill
- Host: GitHub
- URL: https://github.com/yanamlnk/simple-banking-system
- Owner: yanamlnk
- Created: 2023-09-01T14:02:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-01T16:39:33.000Z (about 1 year ago)
- Last Synced: 2023-09-02T14:48:45.201Z (about 1 year ago)
- Topics: gradle, java, sqlite
- Language: Java
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
[Simple Banking System](https://hyperskill.org/projects/93) project is a part of Java Backend Developer track provided by Hyperskill.- This is an application for managing banking system. Application can generate card number along with PIN, user can log in to the account and check balance, add income, make transfer to another account in the database and delete account.
- All card numbers start with 400000 and generated randomly with the last number generated with help of the Luhn Algorithm.
- Application is working with SQLite database.
- Connection to the database is done with the help of JDBC api.
- Database has only one table `card` with the following columns:
- `id` INTEGER
- `number` TEXT
- `pin` TEXT
- `balance` INTEGER DEFAULT 0# Functionality
After the connection to the database is established, application outputs menu with the help of `System.out`. Application is getting user's input through `System.in`.```
1. Create an account
2. Log into account
0. Exit
```
- `Exit` stops the application
- `Create account` generates card number along with PIN
- `Log into account` requires card number and PIN. If log in is successful, user gets transferred to the account menu```
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
```
With this menu user can check current balance, add income (any positive number), make transfer (can't make transfer of the higher sum than balance, to the same account, or to the non-existing account), and close (=delete) account.**Example**
```
// user's input is indicated with >>1. Create an account
2. Log into account
0. Exit
>> 1Your card has been created
Your card number:
4000003789119852
Your card PIN:
96501. Create an account
2. Log into account
0. Exit
>> 1Your card has been created
Your card number:
4000008021181123
Your card PIN:
21621. Create an account
2. Log into account
0. Exit
>> 2Enter your card number:
>> 4000003789119852
Enter your PIN:
>> 9650You have successfully logged in!
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 1Balance: 0
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 2Enter income:
>> 100
Income was added!1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 3Transfer
Enter card number:
>> 4000008021181122
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
>> 3Transfer
Enter card number:
>> 4000008021181123
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
>> 3Transfer
Enter card number:
>> 4000008021181123
Enter how much money you want to transfer:
>> -100
Transfer must be higher than 01. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 3Transfer
Enter card number:
>> 4000003789119852
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
>> 3Transfer
Enter card number:
>> 4000008021181123
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
>> 1Balance: 0
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 5You have successfully logged out!
1. Create an account
2. Log into account
0. Exit
>> 2Enter your card number:
>> 4000008021181123
Enter your PIN:
>> 0000
Wrong card number or PIN!1. Create an account
2. Log into account
0. Exit
>> 2Enter your card number:
>> 4000008021181123
Enter your PIN:
>> 2162You have successfully logged in!
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 1Balance: 100
1. Balance
2. Add income
3. Do transfer
4. Close account
5. Log out
0. Exit
>> 4The account has been closed!
1. Create an account
2. Log into account
0. Exit
>> 2Enter your card number:
>> 4000008021181123
Enter your PIN:
>> 2162
Wrong card number or PIN!1. Create an account
2. Log into account
0. Exit
>> 0Bye!
```