Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update currencyconvert.java and Create Bank.java #163

Merged
merged 2 commits into from
Oct 2, 2023
Merged

Update currencyconvert.java and Create Bank.java #163

merged 2 commits into from
Oct 2, 2023

Conversation

THEPHD1331
Copy link
Contributor

Code Organization: The code is organized into a more structured manner with proper indentation and comments to improve readability.

Used Constants: Define constants for strings like "million", "billion", and "trillion" to avoid using string literals directly in the code.

Used Descriptive Variable Names: Used more descriptive variable names to improve code readability.

Exception Handling: Added exception handling to catch NumberFormatException if the provided amount is not a valid number.

Close Resources: Closed the input stream (in) properly using a try-with-resources block to ensure resources are released correctly.

Remove Unnecessary Imports: Removed unnecessary imports that were not used in the code.

Code Organization: The code is organized into a more structured manner with proper indentation and comments to improve readability.

Use Constants: Define constants for strings like "million", "billion", and "trillion" to avoid using string literals directly in the code.

Use Descriptive Variable Names: Use more descriptive variable names to improve code readability.

Exception Handling: Added exception handling to catch NumberFormatException if the provided amount is not a valid number.

Close Resources: Closed the input stream (in) properly using a try-with-resources block to ensure resources are released correctly.

Remove Unnecessary Imports: Removed unnecessary imports that were not used in the code.
This code represents a simple banking application that allows customers to perform various banking operations

It defines a class Account that represents a bank account with attributes like balance, previous transaction, customer name, and customer ID. The class includes methods for depositing, withdrawing, and viewing the previous transaction.

The start method in the Account class serves as the main interaction point with the user. It displays a menu of options for checking the balance, depositing, withdrawing, viewing the previous transaction, and exiting. It repeatedly prompts the user for their choice until they choose to exit.

The Bank class is the main class of the program. It creates three instances of the Account class, each representing a different customer's account.

Users are prompted to enter a PIN, and based on the PIN entered, one of the customer accounts is accessed using the start method.

The program provides a simple text-based interface for customers to interact with their accounts.

It demonstrates basic object-oriented programming principles and user interaction with a console-based banking application.
@THEPHD1331 THEPHD1331 changed the title Update currencyconvert.java Update currencyconvert.java and Create Bank.java Oct 2, 2023
@kishanrajput23 kishanrajput23 merged commit 407bebe into kishanrajput23:main Oct 2, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants