Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flexycode/ccprgg1l_activity_com23p

CCPRGG1L-COMP23P Group Project for 1st semester final exam project, Exercises and Lab Activity for Professor Jay Abaleta
https://github.com/flexycode/ccprgg1l_activity_com23p

java project

Last synced: about 5 hours ago
JSON representation

CCPRGG1L-COMP23P Group Project for 1st semester final exam project, Exercises and Lab Activity for Professor Jay Abaleta

Awesome Lists containing this project

README

        

# πŸ’« CCPRGG1L_FINALPROJECT_COM23PΒ 
### Group Name: [Artificial Ledger](https://www.youtube.com/watch?v=dQw4w9WgXcQ)Β  πŸ‡΅πŸ‡­
### Name: [Jay Arre Talosig](https://github.com/flexycode)Β 
### Subject & Section: πŸ§šβ€β™‚οΈ [CCPRGG1L COM23P](https://www.youtube.com/watch?v=dQw4w9WgXcQ)Β πŸ§šβ€β™€οΈΒ Β 
### Professor: πŸ‘¦ [Jay D. Abaleta](https://www.youtube.com/watch?v=Zi_XLOBDo_Y)Β Β Β Β Β Β Β 

[CCPRGG1L-COMP23P Group Project for 1st semester final exam project](https://www.youtube.com/watch?v=Ts9kBO6Nr_s)

# πŸ“Š Table of Contents

## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

## [Introduction](#introduction)
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

### CCPRGG1L Table lecture

| 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. |

# Banking System

## Introduction
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.

## Features
- 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.

### Code Structure Tree

New Version of CryptoBank diagram tree
```bash
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
```

### Previous Version when I used Encapsulation

CryptoBank diagram tree
```bash
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()
```

### Tree Diagram Simple Structure
```bash
CryptoBankΒ (Workspace Folder in Eclipse or VS Code
β”œβ”€β”€ bin
└── Package
β”œβ”€β”€ src
Β  └── CryptoBank.java (java file class)
```
#### Switch Statement
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` with `true` to deposit money.
* Case 3: Calls `performTransaction` with `false` to withdraw money.
* Case 4: Calls `checkBalance` to display an account's balance.
* Case 5: Exits the program.

#### Methods for Deposit and Withdraw
* **createNewAccount(Scanner scanner)**: This method prompts the user for an account name, creates a new `BankAccount` object with a unique account number (based on `accountCount`), and adds it to the `accounts` array. It also increments `accountCount`.

* **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.

#### Testing the Array with Temporary Data
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.

#### Important Features in the Code
* **Static Inner Class**: The `BankAccount` class is defined as a static inner class within `CryptoBank`. This is a way to encapsulate the `BankAccount` class within the CryptoBank class, making it clear that BankAccount is closely related to CryptoBank.

* **Array Usage**: The `accounts` array is used to store multiple `BankAccount` 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` and `switch` 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 as `static`, meaning it's shared by all instances of the `CryptoBank` 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.

# 🧊 Installation  

### Installation ✍️      
1. Clone the repository to your local machine.
2. Open the project in your preferred programming environment.
3. Build the project to compile the source code.

### Usage ✍️
1. Run the `CryptoBank` class to start the program.Β Β 
2. Follow the on-screen menu options to perform various banking activities.
3. Enter the required information when prompted, such as account numbers, account holder names, deposit/withdrawal amounts, etc.
4. View the program's output to see the results of each operation.

# πŸ† ContributingΒ Β Β 

### ContributingΒ Β 
If you would like to contribute to the Banking System, please follow these steps:
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Make your changes and commit them.
4. Push your changes to your forked repository.
5. Submit a pull request to the main repository.

### 🧠 Submitting Changes

🧠 Contributions are welcome! If you have ideas for improvements or want to add more exercises, follow these steps:

1. Fork the repository.
2. Create a new branch.
3. Make your changes and commit them.
4. Push to your fork and submit a pull request.

### πŸ‘‹ Contributors
### Special thanks to all my groupmates:
* #### 😎 [Jay Arre Talosig](https://github.com/flexycode)
* #### πŸ˜ƒ [Gabriel Angelo ViΓ±as](https://github.com/IYB-Mata)
* #### πŸ₯° [Anilove Tiquio](https://github.com/tiquioani)
* #### πŸ€— [Kristine Vine Navarro](https://github.com/Kristine2811)
* #### 😌 [Joshua Maquilan](https://github.com/Primorion)
* #### πŸ˜‹ [Vince Erol Pangilinan](https://github.com/vinceeee4)

### πŸ›Έ Reporting Issues

###### πŸ€– If you encounter any issues or have suggestions, please open an issue to let us know.

# πŸ”‘ LicenseΒ 

## License
The Banking System is licensed under the [MIT License](https://opensource.org/licenses/MIT) and [ALT Licence](https://github.com/flexycode/BankingSystem/blob/main/LICENSE).
This project is licensed under the MIT License and Artificial Ledger Technology.

# πŸ“« ChangelogsΒ Β Β Β Β 
## [1.4.10] - 2024-03-02Β Β Β Β Β 
### Added
- πŸ“« 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.

### Changed
- πŸ“« Revised all java source code file
- πŸ“« Changed some variable and array
- πŸ“« Changed the value and function for class method in the BankingProgram.java

### Fixed
- πŸ“« 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.

### Problem
- πŸ“« There's an overall issue from this code

#### [Back to Table of Content](#introduction)