Java LAB MANUAL (Students Copy)
Java LAB MANUAL (Students Copy)
SE (SEM-III)
(A.Y. 2025-26)
(Student)
Institute Vision and Mission
Vision of Institute
To nurture the joy of excellence in a world of high technology.
Mission of Institute
To strive to match Global Standards in Technical Education by Interaction with Industry,
Continuous Staff Training and Development of Quality of Life.
M2: To motivate the students to acquire additional soft skills to sharpen their technical and
professional skills that make them employable.
M3: To nurture social and professional ethics in our undergraduates and encourage them to
have lifelong learning.
Program Specific Objectives (PSO)
The ability to design and implement software solutions to meet the end users
PSO2 requirements.
Graduates will be able to apply the art of self-learning to use the modern tools
PEO2
in solving computer engineering problems.
Graduates will be able to inculcate professional and ethical attitude with good
PEO4 leadership qualities and have commitment to social responsibilities in their
thought process.
PROGRAM OUTCOMES (POs)
DONT’S
LAB OBJECTIVES:
1. Familiarize with Basic OOP concepts in Java.
2. Understand the concepts of inheritance and exceptions in java.
3. Design and implement programs involving Client and Server Side Programming.
4. Describe and utilize the functioning of DOM and Java script.
5. Study different design patterns in web programming and understand the working of react framework.
6. To describe the Spring Framework and implement the related case studies.
COURSE OUTCOMES:
Course Name Full Stack Java Programming
Course Code 2113611
Faculty Name Ms. Nilambari Narkar & Ms. Kirti Motwani
Year SE SEM III A.Y. 2025-26
CO Number Course Outcome (The student will be able to ) BT Level
Apply the fundamentals of Java Programming and Object-
2113611.1 L3
Oriented Programming.
PO PO
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PSO1 PSO2
10 11
LO1
LO2
LO3
LO4
LO5
LO6
Full Stack Java Programming (2113611)
Exp.
Title of the Experiment LO’s BL’s PO’s, PSO’s
No.
Basic programming constructs :
1.1 Implement a program to find a maximum of four
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
1 numbers. BL3 LO1
PO11, PSO1, PSO2
1.2 Implement a function prime to check the number
entered by user is prime or not.
Implement a class to represent a bank account.
Include the following members:
Name of the depositor
Account number
Type of Account
Balance amount in the account PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
2 BL3 LO1
Methods: PO11, PSO1, PSO2
To assign initial values (Use constructor)
To deposit an amount
To withdraw an amount after checking
balance
To display the name and balance.
Implement a menu driven program to calculate the
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
3 area of triangle, rectangle and circle using method BL3 LO1
PO11, PSO1, PSO2
overloading.
An educational institution wishes to maintain a
database of its employees. The database is divided
into a number of classes whose hierarchical
relationships as shown in the figure below. Specify
all the classes and retrieve individual information as
and when required.
Exceptions:
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
5 5.1 Demonstrate try, catch, throw, throws and finally. BL3 LO2
PO11, PSO1, PSO2
5.2 Demonstrate user defined exception.
Implement login webpage in JSP that makes
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
6 validation through Database using JDBC and call the BL2 LO3
PO11, PSO1, PSO2
servlets for various operations.
Implement a website using HTML CSS and PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
7 BL3 LO3
JavaScript (create your own profile page) PO11, PSO1, PSO2
Implement a program using Java Script to validate
the email address entered by the user (check the
presence of “@” & “.” character. If this character is PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
8 BL3 LO4
missing, the script should display an alert box PO11, PSO1, PSO2
reporting the error and ask the user to re-enter it
again).
Implement a program based on Document Object
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
9 Model to change the background color of the web BL3 LO4
PO11, PSO1, PSO2
page automatically after every 5 seconds.
Implement a program for making use of React Hooks
that displays four buttons namely, “Red”, “Blue”,
PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
10 “Green”, “Yellow”. On clicking any of these buttons, BL3 LO5
PO11, PSO1, PSO2
the code displays the message that you have selected
that particular color.
Implement a program to create a Monolithic PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
11 BL3 LO6
Application using SpringBoot PO11, PSO1, PSO2
LO1- PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
12 Mini Project BL3
LO6 PO11, PSO1, PSO2
Implement a program on collections. (Beyond LO1- PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9,
13 BL3
Syllabus) LO6 PO11, PSO1, PSO2
Experiment No. 1
Theory:
Java provides basic programming constructs like variables, data types, conditional statements, loops, and functions
that form the foundation of any program.
Steps in Java:
A prime number is a number greater than 1 that has no divisors other than 1 and itself.
Steps:
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a class to represent a bank account. Include the following members:
Name of the depositor
Account number
Type of Account
Balance amount in the account
Methods:
To assign initial values (Use constructor)
To deposit an amount
To withdraw an amount after checking balance
To display the name and balance.
Theory:
Class:
A class in Java is a blueprint or template from which objects are created.
It defines data members (variables) and methods (functions) that represent the behavior of the object.
Object:
An object is an instance of a class.
It occupies memory and has its own identity, state, and behavior.
Constructor:
A constructor is a special method in Java that is used to initialize objects of a class.
It is automatically called when an object is created using the new keyword.
A constructor has the same name as the class and does not have a return type, not even void.
new keyword:
The new keyword in Java is used to create objects dynamically during runtime.
When you use new, it Allocates memory in the heap for the object.
Calls the constructor to initialize the object.
Steps in Object-Oriented Programming:-
1. Define the class with variables and methods.
2. Create objects using the new keyword.
3. Access members using the object (objectName.variable or objectName.method()).
4. Initialize data using constructors or setter methods.
5. Retrieve or display data using getter methods or print statements.
Conclusion: Thus we have successfully studied & implemented a class & object using constructor.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a menu driven program to calculate the area of triangle, rectangle and circle using method
overloading.
Theory:
Method overloading means defining multiple methods with the same name in a class, but with different parameter
lists.
Rules:
All overloaded methods must have the same name.
Method overloading is based on parameter count, type, or order — at least one of these must differ.
All overloaded methods must be defined in the same class or inherited from a superclass.
Overloaded methods can have different access modifiers (public, private, etc.), but it’s not a rule — only allowed.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: An educational institution wishes to maintain a database of its employees. The database is divided into a
number of classes whose hierarchical relationships as shown in the figure below. Specify all the classes and retrieve
individual information as and when required.
Theory:
Inheritance:-
Inheritance is a fundamental concept in OOP(Object-Oriented Programming). It is the mechanism in Java by which one
class is allowed to inherit the features (fields and methods) of another class
Hierarchical Inheritance
In Hierarchical Inheritance, one class serves as a superclass (base class) for more than one subclass. In the below
image, class A serves as a base class for the derived classes B, C, and D.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Exceptions:
5.1 Demonstrate try, catch, throw, throws and finally.
5.2 Demonstrate user defined exception.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement login webpage in JSP that makes validation through Database using JDBC and call the servlets for
various operations.
Theory:
JDBC refers to the Java Database Connectivity. It provides java API that allows Java programs to access database
management systems (relational database). The JDBC API consists of a set of interfaces and classes which enables java
programs to execute SQL statements. Interfaces and classes in JDBC API are written in java.
JDBC core components:
The JDBC API consists of the following core components:
1. JDBC Drivers
2. Connections
3. Statements
4. ResultSets
1. JDBC Drivers:
JDBC driver is a collection of classes which implements interfaces defined in the JDBC API for opening database
connections, interacting with database and closing database connections.
2. Connections:
Before performing any database operation via JDBC, we have to open a database connection. To open a database
connection we can call getConnection() method of DriverManager class.
Syntax:
Connection connection = DriverManager.getConnection(url, user, password)
3. Statements:
The JDBC statements are used to execute the SQL or PL/SQL queries against the database. We need a statement for
every single query. JDBC API defines the Statement, CallableStatement, and PreparedStatement types of statements.
4. ResultSets:
A query returns the data in the form of ResultSet. To read the query result date ResultSet provides a cursor that points
to the current row in the result set.
Servlets provide a component-based, platform-independent method for building Webbased applications, without the
performance limitations of CGI programs. Servlets have access to the entire family of Java APIs, including the JDBC API
to access enterprise databases.
A servlet life cycle can be defined as the entire process from its creation till the destruction. The following are the
paths followed by a servlet.
The servlet is initialized by calling the init() method.
The servlet calls service() method to process a client's request.
The servlet is terminated by calling the destroy() method.
Finally, servlet is garbage collected by the garbage collector of the JVM.
Conclusion: Thus we have successfully studied & Implemented login webpage in JSP that makes validation through
Database using JDBC and call the servlets for various operations
POs Achieved: PO1 PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a website using HTML CSS and JavaScript (create your own profile page)
Theory:
HTML stands for Hyper Text Markup Language. It is the standard markup language for creating Web pages.
It describes the structure of a Web page. It consists of a series of elements. HTML elements tell the browser
how to display the content & label pieces of content such as "this is a heading", "this is a paragraph", "this is
a link", etc.
CSS stands for Cascading Style Sheets. It describes how HTML elements are to be displayed on screen, paper, or in
other media. It saves a lot of work. It can control the layout of multiple web pages all at once.External stylesheets are
stored in CSS files.
Conclusion: Thus we have successfully studied & Implemented website using HTML CSS and JavaScript.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a program using Java Script to validate the email address entered by the user (check the presence of
“@” & “.” character. If this character is missing, the script should display an alert box reporting the error and ask the
user to re-enter it again).
Theory:
JavaScript is the programming language of the web. It can update and change both HTML and CSS. It can calculate,
manipulate and validate data.
Steps to Create Static Pages:
Step 1: Firstly, we will create a folder with the project name and create the HTML (e.g, index.html), CSS (e.g, style.css),
JavaScript files, Images folder, and a separate file for the responsive CSS if required.
Step 2: By using various HTML tags like section, header, meta, title, head, div, I, mg, etc to structure the web page and
includes a header, navigation bar, main content area, and a script tag for our JavaScript file.
Step 3: Add some Style using CSS to the HTML code to make our frontend look good. We'll choose colors and layouts
that look modern and inviting. Add style mainly to the image and beautify the header.
Step 4: Add the JavaScript function, like updating the content based on what the user clicks.
Step 5: You can create a navigation system that dynamically loads content based on user interactions.
Conclusion: Thus we have successfully studied & implemented a program using Java Script to validate the email
address entered by the user.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a program based on Document Object Model to change the background color of the web page
automatically after every 5 seconds.
Theory:
The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that
programs can change the document structure, style, and content. The DOM represents the document as nodes and
objects; that way, programming languages can interact with the page.
Conclusion: Thus we have successfully studied & implemented a program based on Document Object Model to
change the background color of the web page automatically after every 5 seconds.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Aim: Implement a program for making use of React Hooks that displays four buttons namely, “Red”, “Blue”, “Green”,
“Yellow”. On clicking any of these buttons, the code displays the message that you have selected that particular color.
Theory:
React is a front-end JavaScript library. It was developed by the Facebook Software Engineer Jordan Walke. It is also
known as React.js or ReactJS. It is a tool for building UI components.
Conclusion: Thus we have successfully studied & implemented a program for making use of React Hooks.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Theory:
Spring Boot is an open-source Java framework used to create a Micro Service. Spring boot is developed by Pivotal
Team, and it provides a faster way to set up and an easier, configure, and run both simple and web-based applications.
It is a combination of Spring Framework and Embedded Servers. The main goal of Spring Boot is to reduce
development, unit test, and integration test time and in Spring Boot, there is no requirement for XML configuration.
Conclusion: Thus we have successfully studied & implemented a program to create a Monolithic Application using
SpringBoot.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Theory:
Implement any real life application. (Report Format will be provided separetly)
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11
Theory:
A collection in Java is a group of individual objects that are treated as a single unit. In Java, a separate framework
named the "Collection Framework" was defined in JDK 1.2, which contains all the Java Collection Classes and
interfaces.
In Java, the Collection interface (java.util.Collection) and Map interface (java.util.Map) are the two main “root”
interfaces of Java collection classes.
POs Achieved: PO1, PO2, PO3, PO4, PO5, PO7, PO8, PO9, PO11