Group Name: Artificial Ledger 🇵🇭
Name: Jay Arre Talosig
Subject & Section: 🧚♂️ CCPRGG1L COM23P 🧚♀️
Professor: 👦 Jay D. Abaleta
CCPRGG1L-COMP23P Group Project for 1st semester final exam project
This repository contains source code for a Java project that focuses on fundamental concepts and exercises. The code includes examples of input/output operations, arithmetic calculations, and basic Java syntax.
⚡ Course Outline: https://nationalueduph.sharepoint.com/:w:/r/sites/FundamentalsofProgramming-CCPRGG1LCOM23P/_layouts/15/Doc2.aspx?action=edit&sourcedoc=%7B5e6c8bed-44a9-4add-a947-3c727bf33daa%7D&wdOrigin=TEAMS-MAGLEV.teamsSdk_ns.rwc&wdExp=TEAMS-TREATMENT&wdhostclicktime=1707804185955&web=1
⚡ Repository Source: https://github.com/flexycode/CCPRGG1L_FUNDAMENTALS_COM23P
⚡ Object-Oriented Source Code: https://https://github.com/flexycode/BankingSystem
Topic | Description |
---|---|
Part 1 - Introduce Basic Programming | Introduction to basic programming concepts, variables, and types. |
Part 2 - Java Programming | Overview of problem-solving phases in programming. |
Part 3a - Understand the Basic Concepts of Object-Oriented Programming (OOP) | Comparison of procedural programming and OOP principles. |
Part 3b - Learn How to Declare and Use Classes and Objects in Java | Introduction to classes and objects in Java. |
Part 4 - Learn How to Implement User-Defined Methods | Overview of primitive types, the String class, and basic operators (arithmetic, relational, and logical). |
Part 5 - Identify the Types of Variables and Their Scope | Understanding class methods and variable scoping. |
Part 6 - Sequential, Conditional, and Iteration Structures | Introduction to sequential structures in programming. |
Part 7 - Learn the Difference Between Sequential, Conditional, and Iteration Structures | Overview of conditional structures in programming. |
Part 8 - Learn How to Use Various Conditional Structures | Practical applications of different conditional structures. |
Part 9 - Learn the Difference Between Sequential, Conditional, and Iteration Structures | Overview of iteration structures in programming. |
Part 10 - Learn How to Use Various Iteration Structures | Practical applications of different iteration structures. |
Part 11 - Learn Built-in Mathematical Functions in the Java Math Class Library | Overview of string and character operations. |
Part 12 - Learn About Arrays and Array Lists in Java | Introduction to arrays and array lists in Java. |
Welcome to the Banking System! This system allows users to perform various banking activities such as creating accounts, depositing/withdrawing money, checking balances, and displaying account details. A banking program in Java, that the users can do the following banking activities like creating accounts, depositing/withdrawing money, checking balance, and displaying account details.
- Create new bank accounts with unique account numbers and account holder names.
- Deposit money into existing accounts.
- Withdraw money from existing accounts, with checks for sufficient balance.
- Check the current balance of an account.
- Display detailed information about an account.
New Version of CryptoBank diagram tree
CryptoBank.java
├── main(String[] args)
│ ├── Scanner for input
│ └── Switch statement for menu options
├── createNewAccount(Scanner scanner)
│ ├── Checks if maximum account limit is reached
│ └── Creates a new account and adds it to the account arrays
├── performTransaction(Scanner scanner, boolean isDeposit)
│ ├── Asks for account number and amount
│ └── Performs deposit or withdrawal based on isDeposit flag
└── checkBalance(Scanner scanner)
├── Asks for account number
└── Displays the balance of the specified account
CryptoBank diagram tree
CryptoBank.java
│
├── main(String[] args)
│ ├── Scanner for input
│ └── Switch statement for menu options
│
├── createNewAccount(Scanner scanner)
│ ├── Checks if maximum account limit is reached
│ └── Creates a new BankAccount and adds it to the accounts array
│
├── performTransaction(Scanner scanner, boolean isDeposit)
│ ├── Asks for account number and amount
│ └── Performs deposit or withdrawal based on isDeposit flag
│
├── checkBalance(Scanner scanner)
│ ├── Asks for account number
│ └── Displays the balance of the specified account
│
└── BankAccount (Static Inner Class)
├── Fields: accountName, accountNumber, balance
├── Constructor: BankAccount(String accountName, int accountNumber)
├── deposit(double amount)
├── withdraw(double amount)
└── checkBalance()
CryptoBank (Workspace Folder in Eclipse or VS Code
├── bin
└── Package
├── src
└── CryptoBank.java (java file class)
The switch statement in the main method controls the program's flow based on the user's menu choice. Each case corresponds to a different banking operation, calling the appropriate method:
- Case 1: Calls
createNewAccount
to create a new account. - Case 2: Calls
performTransaction
withtrue
to deposit money. - Case 3: Calls
performTransaction
withfalse
to withdraw money. - Case 4: Calls
checkBalance
to display an account's balance. - Case 5: Exits the program.
-
createNewAccount(Scanner scanner): This method prompts the user for an account name, creates a new
BankAccount
object with a unique account number (based onaccountCount
), and adds it to theaccounts
array. It also incrementsaccountCount
. -
performTransaction(Scanner scanner, boolean isDeposit): Depending on the
isDeposit
flag, this method either deposits or withdraws money from a specified account. It asks the user for the account number and the amount, then performs the requested operation.
The array accounts
is used to store instances of the BankAccount
class. In the main method, the program creates a new BankAccount and adds it to the accounts array when the user chooses to create a new account. This is a form of testing the array with temporary data, as it simulates the creation of new accounts in a real banking system.
-
Static Inner Class: The
BankAccount
class is defined as a static inner class withinCryptoBank
. This is a way to encapsulate theBankAccount
class within the CryptoBank class, making it clear that BankAccount is closely related to CryptoBank. -
Array Usage: The
accounts
array is used to store multipleBankAccount
instances. This is a simple way to manage a collection of accounts in a single variable. -
User Input Handling: The program uses a
Scanner
to handle user input. This is a common way to get input from the user in a console-based Java program. -
Error Handling: The program includes checks to ensure that the user doesn't exceed the maximum number of accounts and that the user doesn't try to deposit or withdraw from a non-existent account.
-
Encapsulation: The
BankAccount
class encapsulates the data and operations related to a bank account. This is a fundamental principle of object-oriented programming. -
Control Flow: The program uses control structures like
if-else
andswitch
statements to manage the flow of the program based on user input. -
Modularity: The program is divided into methods, each responsible for a specific task. This makes the code easier to read, understand, and maintain.
-
Static Fields: The
MAX_ACCOUNTS
field is declared asstatic
, meaning it's shared by all instances of theCryptoBank
class. This is used to limit the number of accounts that can be created. -
Error Messages: The program provides informative error messages when the user enters invalid input or when an operation can't be performed.
-
Looping: The program uses a
do-while
loop to keep the menu running until the user chooses to exit. This ensures that the program doesn't terminate immediately after a single operation.
- Clone the repository to your local machine.
- Open the project in your preferred programming environment.
- Build the project to compile the source code.
- Run the
CryptoBank
class to start the program. - Follow the on-screen menu options to perform various banking activities.
- Enter the required information when prompted, such as account numbers, account holder names, deposit/withdrawal amounts, etc.
- View the program's output to see the results of each operation.
If you would like to contribute to the Banking System, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request to the main repository.
🧠 Contributions are welcome! If you have ideas for improvements or want to add more exercises, follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Push to your fork and submit a pull request.
The Banking System is licensed under the MIT License and ALT Licence. This project is licensed under the MIT License and Artificial Ledger Technology.
- 📫 Uploaded the Project Requirements
- 📫 Created the Project Documentation
- 📫 Added breakdown and documentation
- 📫 Added a function for default Bank Account profile.
- 📫 Added Final revision for CryptoBank.
- 📫 Revised all java source code file
- 📫 Changed some variable and array
- 📫 Changed the value and function for class method in the BankingProgram.java
- 📫 Fixed some error in java methods and classes
- 📫 Fixed the name of the Main Branch for debugging and run the code. BankingProgram will be the main branch while BankingSystem will be the sub-branch.
- 📫 There's an overall issue from this code