0% found this document useful (0 votes)
7 views30 pages

Sample Report XII IT

The document is a project report titled 'Banking System' submitted by Aditya Bhawsar for the Senior Secondary Examination, detailing the design and implementation of a banking application using Java and MySQL. It covers various aspects of Java, including its features, object-oriented programming principles, and Java Database Connectivity (JDBC). Additionally, it discusses the use of Swing for creating a graphical user interface, highlighting its components and advantages.

Uploaded by

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

Sample Report XII IT

The document is a project report titled 'Banking System' submitted by Aditya Bhawsar for the Senior Secondary Examination, detailing the design and implementation of a banking application using Java and MySQL. It covers various aspects of Java, including its features, object-oriented programming principles, and Java Database Connectivity (JDBC). Additionally, it discusses the use of Swing for creating a graphical user interface, highlighting its components and advantages.

Uploaded by

Aditya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Banking System

A Project Report

Submitted in partial fulfillment of the requirement for the

SENIOR SECONDARY EXAMINATION (AISSCE)

Submitted To

[CENTRAL BOARD SECONDARY EDUCATION]

Submitted By:
Aditya Bhawsar
Roll No -___________________

Under The Supervision Of:

Mrs. Chhaya Lakshkar


(PGT IT)
Department of Computer Science
St. Thomas Sr. Sec. School, Mandsaur (M.P.)

DEPARTMENT OF COMPUTER SCIENCE


ST. THOMAS SR. SEC. SCHOOL ,MANDSAUR
CERTIFICATE .

This is to certify that the project titled “Banking


System” submitted by Master Aditya Bhawsar having
roll no ________ of CLASS XII has completed this
project for partial rollback in full - fillment of the
requirement for the senior secondary examination
(AISSCE)embodies the bonafide work done by him/her
under my supervision.

Principal External Internal


Supervisor Supervisor

Signature Signature Signature

Sr. Abhaya CMC Mrs. Chhaya Lakshkar


ID – SHEET

Roll No: ………………………….

Name of Student: Aditya Bhawsar

Address : Khanpura, Mandsaur


M.P.

Phone No: 9009851619

Email Address: [email protected]

Supervisor : Mrs. Chhaya Lakshkar

Project Title: Banking System


ACKNOWLEDGEMENT

It would be our outmost pleasure to express


our sincere thanks to our Information
Technology Teacher Mrs. Chhaya Lakshkar in
providing a helping hand in this project.

Her unflagging patience, creativity and


immense knowledge that she shared with us
have proved highly beneficial to us and have
made our Project possible and successful.

Aditya Bhawsar
TABLE OF CONTENTS

 Introduction

 Java Details

 Preliminary Design

 Implementation

 Bibliography
INTRODUCTION

This program is designed for the use


of Banking System and its
functioning Main Objective of this
project to facilitate the transactions
through use of electronic medium.
We use java netbeans 6.5
software and Mysql to
programming our project.

What is java?
Java is a general purpose object oriented programming
language. It is the first programming language that is not tied
to any particular hardware or operating system .The language
is based on the concept of an object. Java is highly derived
from C++. Most striking feature of the language is that it is
platform neutral language.
There were five primary goals in the creation of the Java
language:

• It should use the object-oriented programming methodology.


• It should allow the same program to be executed on multiple
operating systems.
• It should contain built-in support for using computer
networks.
• It should be designed to execute code from remote sources
securely.
• It should be easy to use and borrow the good parts of older
object-oriented languages like C++.

Java tools
In order to write java application or applets ,one need more
than a language . The tools that lets one to write , test , debug
programs.

Java features
● Compiler and Interpreted
● Platform independent
● Simple
● Secure
● Familiar
● Portable
● Object-Oriented
● Robust
● Multithreaded
● High performance
● Distributed
● Dynamic
Compiler and Interpreted -There is a java compiler, named
javac. The java compiler takes input source code files (these
files typically have the ext.java) and converts them into
compiled bytecode files. The java Interpreter known as javac
can be used to execute java application .The interpreter
translates bytecode directly into program actions.

Platform independent- Java programs can be easily moved


from one computer to another, anywhere and anytime.
Changes and upgrades made in operating systems, processors
and system resources will not force any changes in java
programs.

Simple - Java is designed to be easy for programmer to learn


and use efficiently.

Secure- When we use a java compatible web browser, we can


safely download java applets without fear of virus infection.
Java achieves this protection by confining a java program to
java execution environment and not allowing it access to other
parts of the computer.

Familiar- It is modeled on C, C++ languages. Java code looks


like C++.

Portable- Java compiler generates bytecode instructions that


can be implemented on any machine and also the size of the
primitive data types are machine independent.

Object-Oriented - Java is a true object-oriented language. All


program code and data reside within objects and classes.
Robust -It provides many safeguards to ensure reliable code.
It has strict compile time and run time checking for data types.
Designed as a garbage-collected language relieving the
programmers and also incorpates the concept of exception
handling which captures series errors.

Multithreaded - Java supports handling multiple tasks


simultaneously which greatly improves the interactive
performance of graphical applications.

High performance- Java performance is impressive for an


interpreted language, mainly due to use of immediate
bytecode. Use of multithreaded and further its architecture is
also designed to reduce overheads during runtime.

Distributed- It has ability to share both data and programs.


Java applications can open and access remote objects on
internet which enables multiple programmers at multiple
remote locations to collaborate and work together on single
project.

Dynamic - Java is capable of dynamically in new class


libraries , methods and objects .It supports functions written in
other languages like C,C++ called as native methods.

Automatic garbage collection -One idea behind Java's


automatic memory management model is that programmers
should be spared the burden of having to perform manual
memory management. In some languages the programmer
allocates memory to create any object stored on the heap and
is responsible for later manually deallocating that memory to
delete any such objects. If a programmer forgets to de-allocate
memory or writes code that fails to do so in a timely fashion, a
memory leak can occur: the program will consume a
potentially arbitrarily large amount of memory. In addition, if
a region of memory is de-allocated twice, the program can
become unstable and may crash.

In Java, this potential problem is avoided by automatic


garbage collection. The programmer determines when objects
are created and the Java runtime is responsible for managing
the objects' lifecycle. The program or other objects can
reference an object by holding a reference to it (which, from a
low-level point of view, is its address on the heap). When no
references to an object remain, the Java garbage collector
automatically deletes the unreachable object, freeing memory
and preventing a memory leak. Memory leaks may still occur
if a programmer's code holds a reference to an object that is
no longer needed—in other words, they can still occur but at
higher conceptual levels.

Comparing Java and C++, it is possible in C++ to implement


similar functionality (for example, a memory management
model for specific classes can be designed in C++ to improve
speed and lower memory fragmentation considerably), with
the possibly cost of extra development time and some
application complexity. In Java, garbage collection is built in
and virtually invisible to the developer. That is, developers
may have no notion of when garbage collection will take
place as it may not necessarily correlate with any actions
being explicitly performed by the code they write. Depending
on intended application, this can be beneficial or
disadvantageous: the programmer is freed from performing
low-level tasks but at the same time lose the option of writing
lower level code.
Java Magic: The Bytecode

Bytecode is a highly optimized set of instruction designed to


be executed by the java runtime system, which is called Java
Virtual Machine and it exists only inside the computer
memory.
Java Program Java Compiler Virtual Machine

Source code Bytecode


Process of Compilation

Bytecode Java Interpreter Machine code


Virtual Machine Real
Machine

Process of converting Bytecode into Machine code

Object Oriented Programming

Object Oriented Programming is an approach that provides a


way of modularizing programs by creating partitioned
memory area for both data and functions that can be used as
templates for creating copies of such modules on demand.

Objects and Classes -An object is a software bundle of


variables and related methods. Objects are key to
understanding object-oriented technology. Real-world objects
share two characteristics: They all have state and behavior.
Software objects are modeled after real-world objects in that
they too have state and behaviorClasses can also define class
variables. A class variable contains information that is shared
by all instances of the class .A class can also declare class
methods. You can invoke a class method directly from the
class, whereas you must invoke instance methods on a
particular instance.

Encapsulation - Wrapping of data and methods into a single


unit is known as encapsulation. It is the most striking feature
of class. The data is not accessible to outside world and only
those methods which are wrapped in the class can access it.
The insulation of the data from direct access by the program is
called data hiding.

Inheritance - Inheritance is the process by which objects of


one class acquire the property of objects of another class.
Each subclass inherits state .However, subclasses are not
limited to the states and behaviors provided to them by their
superclass. Subclasses can add variables and methods to the
ones they inherit from the superclass. It supports the concept
of hierarchical classification it also provides the use of
reusability. .

Polymorphism - This means the ability to take more than one


form. An operation may exhibit different behavior in different
instances. The behavior depends upon the types of data used
in the operation. It plays an important role in allowing objects
having different internal structures to share external interface.

Java SE - Java Database Connectivity (JDBC)

The Java Database Connectivity (JDBC) API is the industry


standard for database-independent connectivity between the
Java programming language and a wide range of databases –
SQL databases and other tabular data sources, such as
spreadsheets or flat files. The JDBC API provides a call-level
API for SQL-based database access.

JDBC technology allows you to use the Java programming


language to exploit "Write Once, Run Anywhere" capabilities
for applications that require access to enterprise data. With a
JDBC technology-enabled driver, you can connect all
corporate data even in a heterogeneous environment.

Advantages of JDBC Technology:

Leverage Existing Enterprise Data

Simplified Enterprise Development

Zero Configuration for Network Computers

Driver Loads database drivers and manages the


manager connections between the application and
the driver
Driver Translates API calls into operations for a
specific data source
Connection A session between an application and a
database
Statement A SQL statement to perform a query or
update operation
Metadata Information about returned data ,
database and driver
Resultset Logical set of columns and rows of data
returned by executing a statement

Driver Manager Connection Statement ResultSet

Driver

Database
Database

The JDBC architecture is based on a collection of java interfaces


and classes that together enable you to connect to data sources , to
create and execute SQL statements and to retrieve and modify data
in a database.
The JDBC-ODBC Bridge –“sun.jdbc.odbc.jdbcodbcDriver”-is
included with JDK and it enables Java applications to access data
through drivers written to the ODBC standard. The driver bridge is
useful for accessing data in data sources for which no pure JDBC
drivers exist. The bridge works by translating the JDBC methods
into ODBC function calls.

SQL-STRUCTURED QUERY LANGUAGE


SQL is not a procedural language. It is not used to define
complex processes; we can use SQL to use commands that
define and manipulate data. SQL is different from other
languages.
• SQL is very readable.
• In SQL we always issue commands.
SQL statements fall into two groups:-
● Data Definition Language (DDL) – DDL statements are
used to describe the tables and the data they contain. The
subset of SQL statements used for modeling the structure
(rather than the contents) of a database or cube. The DDL
gives you the ability to create, modify, and remove databases
and database objects.
● Data Manipulation Language (DML) – DML statements
that are used to operate on data in the database. These are
statements that allow you to create or alter objects (such as
tables, indexes, views, and so on) in the database. The subset
of SQL statements used to retrieve and manipulate data. DML
can be further divided into 2 groups:-
● Select Statements – Statements that return a set of results.
● Everything else – Statements that don’t return a set of results.
Here are some of the quries defined:-
SELECT - SQL statement used to request a selection,
projection, join, query, and so on, from a SQL Server
database.
Primary key – Primary key constraints identify the column or
set of columns whose values uniquely identify a row in a
table. No two rows in a table can have the same primary key
value. You cannot enter a NULL value for any column in a
primary key.
Insert- The Insert logical operator inserts each row from its
input into the object specified in the Argument column. To
insert the data into a relation we either specify a tuple to be
inserted or write a query.
Delete- The Delete logical operator deletes from an object
rows that satisfy the optional predicate in the Argument
column. We can delete only whole tuples; we cannot delete
values on only particular attributes.
Update- The Update logical operator updates each row from
its input in the object specified in the Argument column. It
provides a way of modifying existing data in a table.
SWING

SWING is a set of classes that provides powerful and flexible


functionality. In addition with several components provided
by AWT, swing supplies several exciting additions, including
tabbed panes, scroll panes, trees and tables. It also changes the
images as the state of any component changes. Swing is built
upon the foundation of the AWT. Swing components are
written entirely in Java and therefore are Platform-
independent .Swing is also termed also light-weight and
provide pluggable look and feel.
There are 2 Swing classes that are quite important:

Jframe and Component – Jframe extends the AWT class


Frame. It contains additional features that enable it to support
Swing components. JComponent extends the AWT
component and Container classes. It is the top level class for
all Swing components and provides Swing pluggable look and
feel.
Here are some of the Swing component classes:
CLASS DESCRIPTION
Abstract Button Abstract super class for Swing buttons.
Button Group Encapsulates a mutually exclusive set of
buttons.
Image Icon Encapsulates an icon.
JApplet The SWING version of APPLET.
JButton The SWING push button class.
JCheckBox The SWING check box class.
JComboBox Encapsulates a combo box .
JLabels The SWING version of a label.
JRadioButton The SWING version of a radio button.
JScrollPane Encapsulates a scrollable window.
JTabbedPane Encapsulates a tabbed window.
JTextField The SWING version of Text field.
JTree Encapsulates a tree based-control.

Here are the some of the components used:

● JApplet– Applet that use SWING must be subclass of


JApplet.
JApplet is rich with functionality that is not found in Applet.

● Icons – Icons are encapsulated by the Image Icon class,


which paints an icon from an image.

● JLabel – Labels are the instances of the JLabel class which


extends JComponent. It can display text or icon. These are
passive controls that do not support any interaction with the
user.
● JTextFields – Text field is encapsulated by the
JTextComponent class which extends JComponent.
JTextField allows you to edit one line of text.

● JButton – JButton class provides the functionality of a push


button. JButton allows an icon of string to be associated with
the push button.

● JCheckBox – It is supported by the JCheckBox class. It is a


control that is used to turn an option on or off.

● JTextArea - Text area is encapsulated by the


JTextComponent class which extends JComponent. JTextArea
allows you to edit multiline of text.

● JRadioButton – it is supported by the JRadioButton class.


It can be configured into a group of check boxes in which
only one check box can be checked at any one time.

● JComboBox– It is provided through the JComboBox class.


It normally displays one entry and can also display a drop
down list that allows a user to select a different entry.

● JScrollPane– It is a component that presents a rectangular


area in which a component may be viewed. These are
implemented in Swing by JScrollPane class.

● JTree - It is a component that presents a hierarchical view


of data. A user has ability to expand individual subtrees.
These are implemented in Swing by JTree class.

ADVANTAGES OF (JAVAX) SWING:


1. It provides more powerful and more flexible components
possible in AWT package. For e.g. JButton can have
both image as well as text field associated with it which
is not possible in awt package.

2. Unlike AWT components SWING components are not


implemented by platform-specific code. Instead they are
written entirely in java and therefore are platform
independent. Thus term lightweight is used to describe
such elements.

3. Further the Swing components can provide pluggable


look and feel, which means that it is easy to substitute
another appearance and behavior for an element.
PRELIMINARY DESIGN
import java.util.Scanner;

public class BankingApplication {

public static void main(String[] args) {


BankAccount obj = new BankAccount("GROUP", "GRP0001");
obj.showMenu();
}
}

class BankAccount {
int balance;
int previousTransaction;
String customerName;
String customerID;

BankAccount(String cname, String cid) {


customerName = cname;
customerID = cid;
}

void deposit(int amount) {


if (amount > 0) {
balance += amount;
previousTransaction = amount;
System.out.println("Deposited: " + amount);
} else {
System.out.println("Invalid deposit amount.");
}
}
void withdraw(int amount) {
if (amount > 0) {
if (balance >= amount) {
balance -= amount;
previousTransaction = -amount;
System.out.println("Withdrawn: " + amount);
} else {
System.out.println("Insufficient balance!");
}
} else {
System.out.println("Invalid withdrawal amount.");
}
}

void getPreviousTransaction() {
if (previousTransaction > 0) {
System.out.println("Deposited: " + previousTransaction);
} else if (previousTransaction < 0) {
System.out.println("Withdrawn: " +
Math.abs(previousTransaction));
} else {
System.out.println("No transaction occurred.");
}
}

void showMenu() {
char option;
Scanner scanner = new Scanner(System.in);

System.out.println("Welcome " + customerName);


System.out.println("Your ID: " + customerID);
System.out.println("\n");

do {
System.out.println("==================================
=======");
System.out.println("A: Check your balance");
System.out.println("B: Deposit");
System.out.println("C: Withdraw");
System.out.println("D: Previous Transaction");
System.out.println("E: Exit");
System.out.println("==================================
=======");
System.out.print("Enter your option: ");
option = scanner.next().toUpperCase().charAt(0);
System.out.println("\n");

switch (option) {
case 'A':
System.out.println("------------------------------------------------")
;
System.out.println("Balance = " + balance);
System.out.println("------------------------------------------------")
;
break;

case 'B':
System.out.println("------------------------------------------------")
;
System.out.print("Enter an amount to deposit: ");
int depositAmount = scanner.nextInt();
deposit(depositAmount);
break;

case 'C':
System.out.println("------------------------------------------------")
;
System.out.print("Enter an amount to withdraw: ");
int withdrawAmount = scanner.nextInt();
withdraw(withdrawAmount);
break;

case 'D':
System.out.println("------------------------------------------------")
;
getPreviousTransaction();
System.out.println("------------------------------------------------")
;
break;

case 'E':
System.out.println("******************************
*****************");
System.out.println("Thank you for using our services!");
System.out.println("******************************
*****************");
break;

default:
System.out.println("Invalid option! Please enter a valid
option.");
break;
}
} while (option != 'E');

scanner.close();
}
}

IMPLEMENTATION
BIBILOGRAPHY

Book: INFORMATION TECHNOLOGY


Written by:

1. CBSE 12th IT Book

2. Oxford 12th IT Book

You might also like