Advanced Java Practical List

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

L.

D College of Engineering, Ahmedabad


Department of Information Technology
Advanced JAVA
Subject Code: 2160707
B.E. Semester VI

List of Practicals to be performed during laboratory sessions

No. Practical
1 Create chat application using TCP & UDP protocol. Connection on both sides
should end if any one of them types ‘bye’. Implement this on localhost as well as on
multiple devices.
2 Write a network program in which client send a text file to server and server returns
number of characters, lines, words and sentences of that file to client using TCP &
UDP.
3 Implement any one sorting algorithm using TCP/UDP on Server application. Client
sends numbers to the server, server sorts them and passes back to the client.
4 Implement Concurrent TCP Server programming in which more than one client can
connect and communicate with Server for sending the string and server returns the
reverse of string to each client.
5 Write a JDBC program to perform all CRUD operations on data stored in student
table containing the columns for roll number, name and result in percentage using
Statement and Updatable ResultSet.
6 Create a Menu driven program in JDBC for the information given below. Implement
it using:
a) Prepared Statement
b) Callable Statement
Create following Table schema:
1. Employee_Detail (employee_number number NOT NULL Primary key,
employee_name varchar2(50) NOT NULL, department_id number, salary
number, department_name varchar2(50) NOT NULL).
2. Emp_Personal_detail (employee_number number as foreign key,
emp_designation varchar2(20), basic_salary number, allowance number,
hiredate date, phone_number varchar2(20), email varchar2(25), photo as blob,
resume as clob, emp_address varchar2(100)).
• Display all the Records from the both tables by employee_number.
• Insert Record into the Table. (Hint: - create stored procedure insertdata() in
PL/SQL to insert all the field in both tables. Call the procedure from java
application when using Callable Statement).
• Update The existing record by asking employee_number) (HINT: - Take
Updable Resultset)
• Delete Record by asking employee_number)) (Hint: - Take Updable Resultset)
• Program should handle SQLException and SqlWarning.
7 Write a JDBC program for transaction management for practical no. 5 or 6. Use
checkpoints, commit and rollback features.
8 a) Write a servlet to display age of a person by asking his/her date of birth.
b) Write a Servlet Program to Print Today’s Date and time using refresh header.
(Hint: - page should auto refresh)
9 Write a servlet which accepts 10+ numbers using the post method as well as get
method and displays the arithmetic mean, geometric mean and harmonic mean of
those numbers.
10 a) Write a servlet to store your personal details as a cookie and then display it by
reading from the cookie.
b) Write a Servlet that uses cookies to store the number of times a user has visited
the page.
11 Develop a shopping cart using servlet HttpSession object which provides the facility
to select items from various categories (like mobile, laptop, etc.), add them to cart,
view the cart and edit the items added in the shopping cart.
12 Implement a servlet logging in a user. Use filter that authenticates the login info of
the user. If the credentials are correct, it takes the user to welcome page and creates
cookies of the user else asks to re-enter the details.
13 Implement a servlet that adds two numbers. Use two filters in a chain mapped to a
servlet such that the first filter checks the number for a valid format, i.e. numbers
only contain digits and the second filter checks them for a range (1 to 100). If both
conditions are fulfilled then only the servlet performs the operation and displays the
result; otherwise, the execution ends with an appropriate message from the
respective filter.
14 Develop a Web application that prepares student mark sheet using marks obtained
for each subject. Develop the application using JSP, JDBC and JavaBeans such that
the marks stored in the database are accessed using JDBC by the logic implemented
in JavaBeans and the presentation is prepared using JSP which accesses the
JavaBeans.
15 Apply MVC approach using JSP to develop an application that displays bank
account balances. The controller servlet reads a customer ID and passes that to some
data-access code that returns a BankCustomer value bean. The servlet then stores
the bean in the HttpServletRequest object where it will be accessible from
destination JSP pages but nowhere else. If the account balance of the resulting
customer is negative, the servlet forwards to a page designed for delinquent
customers. If the customer has a positive balance of less than $10,000, the servlet
transfers to the standard balance display page. Next, if the customer has a balance
of $10,000 or more, the servlet forwards the request to a page reserved for elite
customers. Finally, if the customer ID is unrecognized, an error page is displayed.
16 Develop a web application for an IT company’s Job Application Portal. Develop
profiles for admin and candidates applying for the job. Admin can view list of
applications. Provide sign up and login feature for the candidates. They can register
for one or more job profiles available. Make use of JSTL and verify if they are
suitable for the job description and send confirmation message of the interview
scheduled, else send rejection message. Access database using SQL tags.
17 Develop a web application that converts entered value from one currency (C1) to
another (C2) on button click. Make use of JSF. Provide various currency options for
both currencies, C1 as well as C2 using drop down menu.
18 Use all facelet tags, convertor tags and validation tags in any of the practicals given
or create your own.
19 Create a Pizza Menu and price calculator using JSF. The input form should include:
• Dropdown menu for choice of pizza bottom
• 8-10 checkboxes for choice of pizza toppings
• Radio buttons to select pizza size
• Text fields for user to enter name and phone number
• Radio button to choose delivery method
When you click on the submit button you come to the output file where all of one's
choices are listed, how much they cost and what the total cost will be.
20 Implement Student Information System (enrolment no., name, semester, SPI, CPI,
backlogs, email, contact no., etc) using Hibernate. It should perform operations such
as inserting student record, searching the records, displaying all records, editing the
record, deleting record, displaying top performer(s), etc.
21 Implement Library Management System (book title, ISBN, author, rating, available
copies, issued copies) using Spring Framework. It should perform operations such
as adding book to library, issuing book(s) to a student, returning books, displaying
all books, search operation, etc.

You might also like