0% found this document useful (0 votes)
12 views6 pages

Loan Management System (Java)

The document outlines a project for a Loan Management System designed for CBSE Class 12 Information Technology. It details the project's aim, tools, features, algorithms, and includes sample code for implementation in Java. The system allows users to manage loans through a console interface, with functionalities such as adding, viewing, searching, deleting loans, and calculating EMIs, while saving data in a CSV file format.

Uploaded by

hazeacker43
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)
12 views6 pages

Loan Management System (Java)

The document outlines a project for a Loan Management System designed for CBSE Class 12 Information Technology. It details the project's aim, tools, features, algorithms, and includes sample code for implementation in Java. The system allows users to manage loans through a console interface, with functionalities such as adding, viewing, searching, deleting loans, and calculating EMIs, while saving data in a CSV file format.

Uploaded by

hazeacker43
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

Loan Management System

CBSE Class 12 - Information Technology Project

Project Title : Loan Management System


Student Name : [Your Name]
Class : XII
Roll No. : [Your Roll No.]
School : [Your School Name]
Teacher : [Teacher's Name]
Date : 04 December 2025
Loan Management System
CBSE Class 12 - Information Technology Project
--------------------------------------------------

Cover Page
----------
Project Title : Loan Management System
Student Name : [Your Name]
Class : XII
Roll No. : [Your Roll No.]
School : [Your School Name]
Teacher : [Teacher's Name]
Date : 04 December 2025

Aim
---
To design and implement a console-based Loan Management System in Java which allows adding,
viewing, searching, deleting loans and calculating monthly EMI. Data is saved in a text file for
persistence.

Tools / Software
----------------
- Java JDK (17+ recommended)
- Any text editor or IDE (VS Code / Notepad++ / Replit / OnlineGDB)
- Operating System: Windows / Linux / macOS

Hardware Requirements
---------------------
- A PC or laptop with internet (optional) and Java installed.
- Minimal RAM and disk space (very small).

Program Features
----------------
1. Add Loan record (Loan ID, Borrower Name, Principal, Annual Rate, Tenure in months)
2. View all loans with computed EMI
3. Search loan by ID
4. Delete loan by ID
5. Calculate EMI for a specific loan ID
6. Save & load data from '[Link]' (CSV format)

Algorithm / Flow
----------------
1. On start, load data from [Link] (if exists)
2. Show menu with options: Add, View, Search, Delete, EMI, Save & Exit
3. Accept user's choice and perform operation
4. Loop until user chooses Save & Exit

Sample Input / Output (Example session)


---------------------------------------
> Add Loan
Loan ID: L001
Borrower Name: Ravi Kumar
Principal: 500000
Annual Interest Rate: 8.5
Tenure (months): 60
Output: Loan added successfully.

> View All


LoanID Borrower Principal Rate% Tenure EMI
L001 Ravi Kumar 500000.00 8.50 60 10218.45

EMI Calculation Formula


-----------------------
EMI = [P * r * (1+r)^n] / [(1+r)^n - 1]
where P = principal, r = monthly interest rate (annualRate/12/100), n = number of months

Code ([Link])
--------------------------------
/*
Loan Management System
CBSE Class 12 - Computer Science (IT Project)
Author: [Your Name]
Class: XII
Roll No.: [Your Roll No.]
School: [Your School Name]
Teacher: [Teacher's Name]

Description:
A console-based Loan Management System to add, view, search, delete loans and calculate EMI.
Data is saved to a CSV text file "[Link]" in the working directory.
Compile: javac [Link]
Run: java LoanManagementSystem
*/

import [Link].*;
import [Link].*;
import [Link];

class Loan {
String loanId;
String borrowerName;
double principal;
double annualRate;
int tenureMonths;

Loan(String loanId, String borrowerName, double principal, double annualRate, int tenureMonths)
{
[Link] = loanId;
[Link] = borrowerName;
[Link] = principal;
[Link] = annualRate;
[Link] = tenureMonths;
}

double monthlyRate() {
return (annualRate / 100.0) / 12.0;
}

double calculateEMI() {
double r = monthlyRate();
int n = tenureMonths;
if (r == 0) return principal / n;
double emi = (principal * r * [Link](1 + r, n)) / ([Link](1 + r, n) - 1);
return emi;
}

@Override
public String toString() {
DecimalFormat df = new DecimalFormat("#.00");
return loanId + "," + borrowerName + "," + [Link](principal) + "," + [Link](annualRate) +
"," + tenureMonths;
}

static Loan fromCSV(String line) {


String[] parts = [Link](",");
if ([Link] < 5) return null;
try {
return new Loan(parts[0], parts[1], [Link](parts[2]), [Link](parts[3]),
[Link](parts[4]));
} catch (Exception e) {
return null;
}
}
}

public class LoanManagementSystem {


static final String DATA_FILE = "[Link]";
private ArrayList<Loan> loans = new ArrayList<>();

public static void main(String[] args) {


LoanManagementSystem app = new LoanManagementSystem();
[Link]();
[Link]();
}

void run() {
Scanner sc = new Scanner([Link]);
while (true) {
[Link]("\n====== Loan Management System ======");
[Link]("1. Add Loan");
[Link]("2. View All Loans");
[Link]("3. Search Loan by ID");
[Link]("4. Delete Loan by ID");
[Link]("5. Calculate EMI for a Loan ID");
[Link]("6. Save & Exit");
[Link]("Enter choice: ");
String ch = [Link]();
switch (ch) {
case "1": addLoan(sc); break;
case "2": viewAll(); break;
case "3": searchLoan(sc); break;
case "4": deleteLoan(sc); break;
case "5": emiForLoan(sc); break;
case "6": save(); [Link]("Saved. Exiting."); return;
default: [Link]("Invalid choice. Try again.");
}
}
}

void addLoan(Scanner sc) {


[Link]("Enter Loan ID: ");
String id = [Link]().trim();
if (findById(id) != null) {
[Link]("Loan ID already exists.");
return;
}
[Link]("Enter Borrower Name: ");
String name = [Link]().trim();
[Link]("Enter Principal Amount: ");
double p = [Link]([Link]().trim());
[Link]("Enter Annual Interest Rate (in %): ");
double r = [Link]([Link]().trim());
[Link]("Enter Tenure (in months): ");
int t = [Link]([Link]().trim());
Loan loan = new Loan(id, name, p, r, t);
[Link](loan);
[Link]("Loan added successfully.");
}

void viewAll() {
if ([Link]()) {
[Link]("No loans available.");
return;
}
[Link]("%-10s %-20s %-12s %-8s %-8s %-10s\n", "LoanID", "Borrower", "Principal",
"Rate%", "Tenure", "EMI");
for (Loan L : loans) {
[Link]("%-10s %-20s %-12.2f %-8.2f %-8d %-10.2f\n", [Link], [Link],
[Link], [Link], [Link], [Link]());
}
}

void searchLoan(Scanner sc) {


[Link]("Enter Loan ID to search: ");
String id = [Link]().trim();
Loan L = findById(id);
if (L == null) [Link]("Loan not found.");
else {
[Link]("Loan Found:");
[Link]("Loan ID: " + [Link]);
[Link]("Borrower: " + [Link]);
[Link]("Principal: " + [Link]);
[Link]("Rate%: " + [Link]);
[Link]("Tenure(months): " + [Link]);
[Link]("Monthly EMI: %.2f\n", [Link]());
}
}

void deleteLoan(Scanner sc) {


[Link]("Enter Loan ID to delete: ");
String id = [Link]().trim();
Loan L = findById(id);
if (L == null) [Link]("Loan not found.");
else {
[Link](L);
[Link]("Loan deleted.");
}
}
void emiForLoan(Scanner sc) {
[Link]("Enter Loan ID to calculate EMI: ");
String id = [Link]().trim();
Loan L = findById(id);
if (L == null) [Link]("Loan not found.");
else [Link]("Monthly EMI for %s = %.2f\n", id, [Link]());
}

Loan findById(String id) {


for (Loan l : loans) if ([Link](id)) return l;
return null;
}

void load() {
[Link]();
File f = new File(DATA_FILE);
if (![Link]()) return;
try (BufferedReader br = new BufferedReader(new FileReader(f))) {
String line;
while ((line = [Link]()) != null) {
Loan L = [Link](line);
if (L != null) [Link](L);
}
} catch (Exception e) {
[Link]("Error loading data: " + [Link]());
}
}

void save() {
try (PrintWriter pw = new PrintWriter(new FileWriter(DATA_FILE))) {
for (Loan L : loans) [Link]([Link]());
} catch (Exception e) {
[Link]("Error saving data: " + [Link]());
}
}
}

Viva Questions (Short)


----------------------
Q1. What is EMI? Explain the formula.
A1. EMI stands for Equated Monthly Instalment. It is calculated using the formula shown above
where P is principal, r is monthly interest rate and n is tenure in months.

Q2. Which file format did you use to save data?


A2. CSV text file '[Link]' in working directory.

Q3. How will you extend this project?


A3. Add GUI (Swing/JavaFX), authentication, detailed amortization schedule, interest types.

Bibliography
------------
- Java Documentation (Oracle)
- CBSE Project Guidelines for Class 12 IT
- Personal implementation & common programming references

You might also like