A minimalistic banking system with features such as:
- Split transaction
- Online Payment
- Transfer
- Savings account
- Used DAO for managing a "database" for accounts and users.
- Command Design Pattern
- Implemented the Command design pattern to handle and execute each user command based on input.
- Factory Design Pattern
- Used the Command design pattern in the getCommand method, which takes an enum of commands and constructs the appropriate command using a switch statement.
- Strategy Design Pattern
- Implemented the Strategy Design Pattern for creating each type of cashback.
- The project is structured into 9 packages:
-
bank:
- Contains the Account class and its subclasses (ClassicAccount and SavingsAccount).
- Contains the Transaction class and its subclasses,
which represent every type of transaction.
(AccountCreation, CardCreation, CardDestruction, CardPayment,
DeleteError, FrozenPayment, InsufficientFunds, InterestChanged,
SendReceive, SplitPaymentTransaction) - Contains the User class.
- Contains the Dao interface, implemented by DaoImpl class.
- Contains DaoObject, implemented by Account and User classes.
- Contains Card class and its subclass OneTimeCard.
-
graph:
- Contains Node class, which represents a node in the currency graph.
- Contains CurrencyGraph class, implemented to handle currency exchanges
-
command:
- Contains Client class, implemented for Command Design Pattern.
- Contains Inovker class of a Command Design Pattern.
- Contains CommandType enum that lists
all the commands of the banking system. - Contains Command interface, with a specific class for each command.
(AddAccount, AddFunds, AddInterest, ChangeInterestRate,
CheckCardStatus, CreateCard, CreateOneTimeCard, DeleteAccount, DeleteCard, PayOnline, PrintTransactions, PrintUsers,
Report, SendMoney, SetAlias, SetMinimumBalance,
SpendingsReport, SplitPayment)
-
start:
- Contains a utility class, with a method that starts the application.
-
main:
- Contains the main method
-
utils:
- Contains a utility class that generates IBANs and card numbers.
-
fileio:
- Contains input classes for handling commands.
-
checker:
- Contains checker's classes.
-
commerciants:
- Contains Cashback Strategy classes.
- Contains Merchant class.
"*" - Prints all transactions for a classic account, and only interest rate transactions for a savings account.
- This is not the final version of the banking system, so many tests may not pass.