BankApp is a simple console-based bank application built with Java and SQLite. The application allows users to register, log in, and manage their checking accounts, including opening new accounts, viewing account details, depositing and withdrawing money, and closing accounts.
- User Registration: Users can register with a unique username and password.
- User Login: Existing users can securely log in with their credentials.
- Account Management:
- Open a new checking account.
- View all accounts associated with the logged-in user.
- Deposit money into an account.
- Withdraw money from an account.
- Close an existing account.
- Data Persistence: All user and account information is stored in a SQLite database.
- Java Development Kit (JDK) 11 or higher
- SQLite
- Maven (for dependency management)
- IntelliJ IDEA or any other Java IDE
-
Clone the repository:
git clone https://github.com/em-t-shells/BankApp.git
-
Navigate to the project directory:
cd BankApp
-
Install dependencies:
mvn clean install
-
Set up the database:
- The database schema will be initialized via the
DatabaseScriptRunner
class, which will run the SQL scriptbank_script.sql
located in thesrc/main/resources
directory.
- The database schema will be initialized via the
-
Run the application:
- Using IntelliJ IDEA:
- Open IntelliJ IDEA.
- Open the project by selecting the
BankApp
directory. - In the Project view, navigate to
src/main/java/com/revature/Main.java
. - Right-click on
Main.java
and selectRun 'Main.main()'
.
- Using Maven:
mvn exec:java -Dexec.mainClass="com.revature.Main"
- Using IntelliJ IDEA:
Once the application is running, you will see a main menu with options to register, log in, or exit the application.
-
Register:
- Choose option
1
to register a new user. - Enter a unique username and password (both should not exceed 30 characters).
- Choose option
-
Login:
- Choose option
2
to log in with existing credentials. - Enter your username and password.
- Choose option
-
Account Management:
- After logging in, you will be presented with the account management menu.
- Choose from options to open a new account, view all accounts, deposit money, withdraw money, or close an account.
-
Exit:
- Choose option
q
to exit the application.
- Choose option
src/
├── main/
│ ├── java/
│ │ └── com/
│ │ └── revature/
│ │ ├── controller/
│ │ │ ├── AccountController.java
│ │ │ └── UserController.java
│ │ ├── entity/
│ │ │ ├── Account.java
│ │ │ └── User.java
│ │ ├── exception/
│ │ │ ├── InvalidLength.java
│ │ │ ├── LoginFail.java
│ │ │ └── UserAlreadyExists.java
│ │ ├── repository/
│ │ │ ├── AccountDao.java
│ │ │ ├── SqliteAccountDao.java
│ │ │ ├── SqliteUserDao.java
│ │ │ └── UserDao.java
│ │ ├── service/
│ │ │ ├── AccountService.java
│ │ │ └── UserService.java
│ │ ├── utils/
│ │ │ ├── DatabaseManager.java
│ │ │ └── DatabaseScriptRunner.java
│ │ └── Main.java
│ └── resources/
│ └── bank_script.sql
└── test/
└── java/
-
Create New Account Types with Different Benefits:
- Implement different types of accounts (e.g., savings, business) with unique benefits and rules.
- Allow users to choose the type of account they want to open.
-
Implement Joint Account Ownership:
- Enable multiple users to share ownership of a single account.
- Implement permissions and roles for joint account holders to manage account access and operations.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature
) - Create a new Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.