0% found this document useful (0 votes)
399 views14 pages

Simple Banking Application Report

The document is a project report for a Simple Banking Application developed by students at Guru Nanak Institute of Technology. It details the application's features, classes, methods, and how it operates, emphasizing its educational value in demonstrating Java programming concepts. The report concludes with potential enhancements for future development, such as adding multiple accounts and implementing authentication.

Uploaded by

ROHAN PAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
399 views14 pages

Simple Banking Application Report

The document is a project report for a Simple Banking Application developed by students at Guru Nanak Institute of Technology. It details the application's features, classes, methods, and how it operates, emphasizing its educational value in demonstrating Java programming concepts. The report concludes with potential enhancements for future development, such as adding multiple accounts and implementing authentication.

Uploaded by

ROHAN PAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3rd Year (5th Semester) (PR591)

Project Report of

Simple Banking Application

Department of Computer Science and Engineering

By

Rohan Pal (Roll No.500122010164_Reg. No.221430110110)


Bikram Ghosh (Roll No.500122010165_Reg. No. 221430110034)
Aniket Das (Roll No.500122010166_Reg. No. 221430110012)
Adeeb Hussain (Roll No.500122010167_Reg. No. 221430110005)
Smarta Das (Roll No.500122010168_Reg. No. 221430110143)

Under the guidance of


Mrs. Sayani Chandra
Assistant Professor, Dept. of CSE
GURUNANAK INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING

CERTIFICATE

This is to certify that the thesis entitled, “Simple Banking Application”


being submitted by Rohan Pal, Bikram Ghosh, Aniket Das, Adeeb
Husain, Smarta Das, for the award of the degree of Bachelor of
Technology (Computer Science and Engineering) of GNIT, is a record of
bonafide research work carried out by his under supervision and
guidance. Rohan Pal, Bikram Ghosh, Aniket Das, Adeeb Hussain, Smarta
Das have worked for nearly four months on the above project at the
Department of Computer Science and Engineering, Guru Nanak Institute
of Technology, Kolkata and this has reached the standard fulfilling the
requirements and the regulation relating to the degree.
The contents of this thesis, in full or part, have not been submitted to any
other university or institution for the award of any degree or diploma.

Supervisor

----------------------------
Mrs. Sayani Chandra
Assistant Professor
Department of Computer Science and Engineering
GNIT, Kolkata.

Head of the Department

----------------------------------
Head of the Department
Department of Computer Science and Engineering,
GNIT, Kolkata
INDEX

SL.
TOPIC PAGE NO.
NO.

1. OVERVIEW 1

2. FEATURES 1-2

3. CLASSES AND METHODS 2-3

4. HOW IT WORKS 3-4

5. KEY POINTS 4-5

6. CODE 5-8

7. SAMPLE INPUT/OUTPUT 8-9

8. CONCLUSION 9-11
ACKNOWLEDGEMENT
We should like to express our special thanks of gratitude to our professor
Mrs. Sayani Chandra who gave us the golden opportunity to do this
wonderful project Application of “Simple Banking Application’’. Those
who helped us in completing our project. We came to know about so
many new things. We are really thankful to them. Secondly, we would
also like to thank to all project group members for finalizing this project
within the limited time frame.

Rohan Pal

---------------------------
Bikram Ghosh
Date: _______________
Place:_______________ ---------------------------
Aniket Das

---------------------------
Adeeb Hussain

---------------------------
Smarta Das

---------------------------
Simple Banking Application
Overview

T
he Simple Banking Application is a console-based program
designed to simulate basic banking operations in a user-friendly
manner. This application serves as an educational example to
demonstrate core programming concepts, including object-oriented
programming, encapsulation, and method invocation in Java. It allows
users to interact with a virtual bank account by performing fundamental
operations such as:
1. Checking the current account balance.
2. Depositing a specified amount of money into the account.
3. Withdrawing a specified amount of money from the account.
4. Viewing details of the most recent transaction.
5. Exiting the application when operations are complete.
The program is implemented with two main classes: banking, which
contains the main method to initiate the program, and BankAccount,
which encapsulates the account-related functionalities. The application
starts by welcoming the user, displaying their name and account ID, and
presenting a menu of options for interaction. Users can perform
operations repeatedly until they choose to exit. This project is ideal for
demonstrating the practical application of Java programming skills in
real-world scenarios.

Features
1. Check Balance: View the current balance of the account.
2. Deposit Money: Add money to the account balance.
3. Withdraw Money: Deduct money from the account balance.
4. View Previous Transaction: Display the most recent transaction.
5. Exit: Close the application.

Classes and Methods

1. banking Class
 Purpose: Serves as the entry point for the application.
 Key Method:
o main(String[] args): Creates a BankAccount object and
invokes the showMenu() method.
2. BankAccount Class
 Purpose: Contains methods and data to manage a bank account.
 Attributes:
o int balance: Stores the current balance of the account (default:
50000).
o int previousTransaction: Stores the last transaction amount.
Positive for deposits, negative for withdrawals.
o String customerName: Stores the account holder's name.
o String customerId: Stores the account holder's ID.
 Constructor:
o BankAccount(String cname, String cid): Initializes
customerName and customerId.
 Methods:
1. void deposit(int amount):
 Adds the specified amount to the balance.
 Updates the previousTransaction.
2. void withdraw(int amount):
 Deducts the specified amount from the balance.
 Updates the previousTransaction.
3. void getPreviousTransaction():
 Displays the most recent transaction:
 "Deposited: [amount]" for a positive value.
 "Withdraw: [amount]" for a negative value.
 "No transaction occurred" if no transaction exists.
4. void showMenu():
 Displays a menu with banking options.
 Accepts user input for operations:
 Option 1: Check Balance.
 Option 2: Deposit Money.
 Option 3: Withdraw Money.
 Option 4: View Previous Transaction.
 Option 5: Exit.
 Executes corresponding actions using a switch statement.

How It Works
1. The application starts by creating an instance of BankAccount with
the user's name and ID.
2. The showMenu() method is invoked to display a menu of options.
3. The user can select an option by entering the corresponding number.
4. The program performs the selected operation and repeats the menu
until the user chooses to exit.

Key Points

1. Initial Balance:
o The account is initialized with a default balance of 50,000 units.
This ensures that the user has a starting amount to perform
operations like withdrawals and viewing their balance. It also
simplifies testing and demonstration of the application's
features.
2. Error Handling:
o The program gracefully manages invalid inputs by displaying
an error message, such as when a user enters an option outside
the valid range (1-5). This prevents unexpected crashes and
improves user experience by guiding users to provide correct
input.
3. User-Friendly Interface:
o The interactive menu-driven interface is straightforward and
allows users to select operations easily. Each action is clearly
explained, and prompts guide the user through each step of the
process. For example, users are prompted to enter an amount
when performing deposits or withdrawals.
4. Transaction Tracking:
o The previousTransaction attribute keeps track of the most
recent operation, whether it is a deposit or a withdrawal. This
allows users to review their last transaction, promoting
transparency and trust in the system.
5. Encapsulation and Modularity:
o The application employs encapsulation by using the
BankAccount class to manage account-specific data and
methods. This modular approach ensures that the main class
(banking) remains clean and focused on initiating the program,
while the BankAccount class handles the core logic.
6. Extensibility:
o The program is designed in a way that it can be easily extended.
For instance, adding features like interest calculation, multiple
account support, or saving account data to files can be done
without significantly altering the existing structure.

Code:
import [Link];

class banking
{

public static void main(String[] args)


{
Scanner sc = new Scanner([Link]);
BankAccount bank1 = new BankAccount("Rohan" , "1050");
[Link]();
}
}

class BankAccount
{
int balance=50000;
int previousTransaction;
String customerName;
String customerId;

BankAccount(String cname , String cid)


{
customerName = cname;
customerId = cid;
}

void deposit(int amount)


{
if(amount != 0)
{
balance = balance + amount;
previousTransaction = amount;
}
}

void withdraw(int amount)


{
if(amount != 0)
{
balance=balance-amount;
previousTransaction= -amount;
}
}

void getPreviousTransaction()
{
if(previousTransaction > 0 )
{
[Link]("Deposited : " + previousTransaction);
}
else if(previousTransaction < 0 )
{
[Link]("withdraw : " + previousTransaction);
}
else
{
[Link]("no transaction is occured...!");
}
}

void showMenu()
{
char option ='\0';
Scanner sc = new Scanner([Link]);

[Link]("Welcome " + customerName);


[Link]("Your customer id is : " + customerId);
[Link]();
[Link]("1. Check Balance");
[Link]("2. Deposit");
[Link]("3. Withdraw");
[Link]("4. Previous Transaction");
[Link]("5. Exit");
do
{
[Link]("*************************************");
[Link]("Enter the option : ");
option = [Link]().charAt(0);
[Link](option);

switch(option)
{
case '1' :
[Link]("*************************************");
[Link]("Your bank balance is : "+ balance);
[Link]();
break;

case '2' :
[Link]("*************************************");
[Link]("Enter the amount to deposit : ");
int amount = [Link]();
deposit(amount);
[Link]("*************************************");
[Link]("After deposit your bank balance is : "+ balance);
break;

case '3' :
[Link]("*************************************");
[Link]("Enter the amount to withdraw : ");
int amount2 = [Link]();
withdraw(amount2);
[Link]("*************************************");
[Link]("After withdraw your bank balance is : "+ balance);
break;

case '4' :
[Link]("*************************************");
getPreviousTransaction();
[Link]();
break;

case '5' :
[Link]("*************************************");
break;

default :
[Link]("************Invalid option Please try
again************");
}
}while(option != '5');
}
}
Sample Input/Output

Example 1: Deposit and Check Balance


Welcome Rohan
Your customer id is : 1050

1. Check Balance
2. Deposit
3. Withdraw
4. Previous Transaction
5. Exit

Enter the option:


2
Enter the amount to deposit: 1000
After deposit your bank balance is: 51000

Enter the option:


1
Your bank balance is: 51000

Example 2: Withdraw and View Previous Transaction


Enter the option:
3
Enter the amount to withdraw: 2000
After withdraw your bank balance is: 48000

Enter the option:


4
Withdraw: -2000
Example 3: Invalid Option
Enter the option:
6
************Invalid option Please try again************

Conclusion

T
his banking application demonstrates the use of classes, methods,
and object-oriented programming concepts in Java. By
structuring the program into distinct classes with clear
responsibilities, the code is both modular and easy to understand. The
interactive menu-driven interface enhances the user experience and
allows for repetitive operations until the user decides to exit.
Furthermore, the application highlights practical uses of variables,
control structures, and method invocations, making it an excellent
example for educational purposes.
The program can also be expanded further by incorporating advanced
features such as:
1. Adding multiple accounts with unique IDs.
2. Implementing authentication using passwords or PINs.
3. Including additional transaction types, such as transferring money
between accounts.
4. Integrating file handling to save and retrieve account data for
persistence.
Overall, this application serves as a solid foundation for understanding
basic banking systems and exploring more advanced programming
techniques.

Common questions

Powered by AI

The BankAccount class encapsulates account-related functionalities by defining specific attributes and methods to manage a bank account. Key components include attributes like balance, previousTransaction, customerName, and customerId. The class includes methods for depositing and withdrawing money, tracking the previous transaction, and displaying a menu for user operations. This encapsulation ensures that the main application logic is clean and focused on user interaction .

The application effectively demonstrates programming concepts by providing a practical, hands-on learning tool. It introduces fundamental topics like encapsulation, method invocation, and error handling within a familiar context of banking operations. The program's structured design and interactive interface facilitate incremental learning and understanding, making it an excellent resource for students and beginners aiming to comprehend object-oriented concepts in Java .

The Simple Banking Application includes features such as checking the current account balance, depositing money, withdrawing money, viewing the previous transaction, and exiting the application. These features facilitate user interaction by providing straightforward options for managing a virtual bank account, thus demonstrating Java programming concepts like encapsulation and object-oriented programming .

Object-oriented programming principles are demonstrated through the usage of classes and methods in the Simple Banking Application. The BankAccount class encapsulates all account-related operations, demonstrating encapsulation and data hiding. Method invocations manage functionalities like deposit and withdrawal, showcasing modularity and reusability, while inheritance concepts could potentially be used for extending account types .

The interactive, menu-driven interface of the Simple Banking Application simplifies user engagement by clearly presenting options and guiding the user through operations. Each step is designed with prompts and clear descriptions, which reduces errors and enhances usability, thereby making the application more engaging and accessible to users .

Potential extensions include adding support for multiple accounts, implementing authentication mechanisms like passwords, including additional transaction types such as transfers, and integrating file handling to save and manage account data persistently. These improvements could enhance user functionalities and increase the application's real-world applicability .

Encapsulation and modularity are achieved by segregating account-specific data and methods within the BankAccount class, while the banking class handles user interaction. This separation allows for easier maintenance and expandability, as new features can be added (e.g., multiple accounts, interest computation) without significantly altering the existing structure .

The initial balance in the BankAccount class is set to 50,000 units, which ensures users have a starting amount to conduct transactions such as withdrawals and balance inquiries. This design choice simplifies testing and demonstrates the application's features more effectively by providing enough balance to perform significant operations without encountering errors like insufficient funds .

Transaction tracking is implemented through the previousTransaction attribute in the BankAccount class, which records the last transaction amount as positive for deposits and negative for withdrawals. This feature is crucial as it allows users to review their most recent transaction, enhancing transparency and trust in the system .

The application manages invalid input by displaying error messages when a user selects an option outside the valid range (1-5). This approach prevents the program from crashing unexpectedly and guides users to enter correct input, thereby improving the user experience and making the application more robust and user-friendly .

You might also like