0% found this document useful (0 votes)
17 views16 pages

HET Ka OOP

The document is a micro project report on a Banking Management Application developed using Java, aimed at demonstrating object-oriented programming concepts. It includes features such as account management, cash deposits, and withdrawals, along with a simple console-based interface. The project serves educational purposes, providing hands-on experience in Java application development while laying the groundwork for future enhancements.

Uploaded by

devraj.patel247
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)
17 views16 pages

HET Ka OOP

The document is a micro project report on a Banking Management Application developed using Java, aimed at demonstrating object-oriented programming concepts. It includes features such as account management, cash deposits, and withdrawals, along with a simple console-based interface. The project serves educational purposes, providing hands-on experience in Java application development while laying the groundwork for future enhancements.

Uploaded by

devraj.patel247
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
You are on page 1/ 16

P age |1

MICRO PROJECT REPORT


(Object Oriented Programming with JAVA - 4341602)

Submitted By
Het Patel (236400316124)

In partial fulfilment for the curriculum of the


4th Semester in

DIPLOMA ENGINEERING

in

Information Technology Department

R. C. Technical Institute, Ahmedabad

Gujarat Technological University, Ahmedabad


DECEMBER – 2025
P age |2

INDEX
Content Page no
Introduction 3
Project Explanation 4-5
Code 6-14
Output 15
Conclusion 16
P age |3

1. INTRODUCTION

The Banking Management Application is a simple Java-based project


designed to simulate basic banking functionalities. It allows customers to
manage their bank accounts through a console-based interface. The primary
aim of this application is to demonstrate the implementation of object-
oriented programming concepts such as classes, objects, methods, and
encapsulation in Java. This system helps users to view their account details
and perform essential transactions like cash deposits and withdrawals. It
serves as a foundational project for understanding how banking operations
can be digitally managed using Java programming.

This application is intended for educational purposes and aims to


provide beginners with hands-on experience in Java application
development. By simulating real-world banking operations, the project also
helps in understanding the logical flow of financial transactions and how
data is securely handled within an application. It lays the groundwork for
more advanced features that can be integrated in future versions, such as
authentication, transaction history, and user interface enhancements.

The system is designed with simplicity in mind, making it easy to


understand and modify. It uses basic Java constructs without relying on
external libraries, ensuring that learners can grasp the core programming
logic without added complexity.
P age |4

2. PROJECT EXPLANATION

The Banking Management Application is structured around core


object-oriented programming principles. The project revolves around a main
BankAccount class that holds customer information and provides methods
to perform operations such as viewing account details, depositing money,
and withdrawing cash. All data is handled within the program, using
variables and methods to simulate real-world banking behavior.

The application runs through a console-based menu system where the user
can choose an operation. When the user selects an option, the corresponding
method is called to perform the action. The system ensures basic validation,
such as checking if the withdrawal amount exceeds the available balance,
thus mimicking essential banking rules.
P age |5

Features of the Banking Management System:

 View Account Details: Displays account holder's name, account


type, account number, and current balance.

 Cash Deposit: Allows users to deposit money into their account and
updates the balance accordingly.

 Cash Withdrawal: Enables users to withdraw money with balance


validation to prevent overdraft.
.
 Simple Menu-Driven Interface: Easy-to-use console-based
interface for navigating banking options.

 Basic Input Validation: Ensures users enter valid amounts for


transactions.

 Object-Oriented Structure: Uses Java classes and methods for


modular and maintainable code.
P age |6

3. CODE and Explanation


P age |7
P age |8
P age |9
P a g e | 10

 Code Explanation
1. Import Statements
import java.io.IOException;
import java.util.Scanner;
 java.util.Scanner is used for reading user input from the console.
 java.io.IOException handles invalid input-related exceptions during I/O operations.

2. Custom Exception Class


class InsufficientBalanceException extends Exception {
public InsufficientBalanceException(String message) {
super(message);
}
}
 This class defines a custom checked exception for cases when a user tries to
withdraw more money than their current balance.
 It extends the built-in Exception class.

3. BankOperations Interface
interface BankOperations {
void viewAccountDetails();
void deposit(double amount);
void withdraw(double amount) throws InsufficientBalanceException;
}
 This interface defines three core banking operations:
o viewAccountDetails()
o deposit()
o withdraw() (can throw InsufficientBalanceException)
 It ensures that any implementing class provides definitions for these methods.
P a g e | 11

4. BankAccount Class
class BankAccount implements BankOperations {
private String name, type, accountNumber, password;
private double balance;
 Represents an individual bank account with personal information and balance.
 Implements the BankOperations interface.

✅ Constructor
public BankAccount(String name, String type, String number, String password, double
balance) {
...
}
 Initializes account details when a new account is created.

✅ getAccountNumber()
public String getAccountNumber() {
return accountNumber;
}
 Returns the account number (used for login).

✅ authenticate()
public boolean authenticate(String pass) {
return this.password.equals(pass);
}
 Validates password during login.

✅ viewAccountDetails()
public void viewAccountDetails() {
...
}
 Displays user name, account type, number, and balance.
P a g e | 12

✅ deposit()
public void deposit(double amount) {
...
}
 Adds money to the account balance after validation.

✅ withdraw()
public void withdraw(double amount) throws InsufficientBalanceException {
...
}
 Allows withdrawal if funds are sufficient. Otherwise, throws a custom exception.

5. BankingApp Class (Main Program)


public class BankingApp {
private static Scanner sc = new Scanner(System.in);
private static BankAccount account;
 Contains the main() method and manages the user interface.
 Uses a static Scanner for reading input and a BankAccount instance.

✅ main() Method
public static void main(String[] args) {
...
}
 Displays welcome message.
 Calls methods to:
o Create an account
o Login
o Show a menu repeatedly (until user exits).
 Handles invalid input via IOException.
P a g e | 13

✅ createAccount()
private static void createAccount() throws IOException {
...
}
 Collects user data (name, type, number, password, initial balance).
 Validates input format (e.g., balance must be a number).
 Creates a new BankAccount object.

✅ login()
private static boolean login() throws IOException {
...
}
 Prompts for account number and password.
 Allows 3 attempts for successful login.
 Returns true if authenticated, otherwise false.

✅ showMenu()
private static void showMenu() {
...
}
 Displays a simple menu:
1. View account
2. Deposit
3. Withdraw
4. Exit
P a g e | 14

✅ handleDeposit()
private static void handleDeposit() throws IOException {
...
}
 Prompts user for deposit amount.
 Calls deposit() method of BankAccount.

✅ handleWithdraw()
private static void handleWithdraw() throws IOException {
...
}
 Prompts user for withdrawal amount.
 Handles InsufficientBalanceException if withdrawal amount exceeds balance.

✅ getValidAmount()
private static double getValidAmount(String prompt) throws IOException {
...
}
 Validates that user enters a numeric amount for deposit or withdrawal.
 Throws IOException on invalid input (non-numeric).
P a g e | 15

4. OUTPUT / RESULT
P a g e | 16

5. CONCLUSION

The Banking Management Application developed using Java


effectively demonstrates the implementation of core object-oriented
principles along with exception handling. It provides a simple and secure
platform where users can create accounts, log in, view account details, and
perform basic banking operations such as deposits and withdrawals. The
inclusion of both custom exceptions and built-in exceptions like
IOException enhances the reliability and robustness of the system by
handling errors gracefully and preventing unexpected crashes.

This project not only highlights the importance of input validation and
secure authentication but also simulates real-world banking functionalities in
a console-based environment. Overall, it lays a strong foundation for further
enhancements like file-based data storage, GUI integration, and transaction
histories in future iterations.

You might also like