List of Experiments-1
List of Experiments-1
1. Write a Java program to demonstrate the concept of socket programming. (CO1, CO2)
2. Write a Java program to demonstrate the concept of applet programming. (CO1, CO2)
3. Write a Java program to demonstrate the concept of multi-threading. (CO1)
4. Write a Java program to demonstrate the concept of applet . (CO1)
5. Write a Java program to demonstrate the use of Java Beans. (CO3)
6. Write a Java program to insert data into a table using JSP. (CO2, CO3)
7. Write JSP program to implement form data validation . (CO2, CO3)
8. Write a Java program to show user validation using Servlet. (CO2, CO3)
9. Write a program to set cookie information using Servlet. (CO2, CO3)
10. Develop a small web program using Servlets, JSPs with Database connectivity. (CO4)
Advanced Java Programming (Additional/ Advanced List
of experiments beyond GGSIPU Syllabus)
1. Create a class Box that uses a parameterized constructor to initialize the dimensions of a box. The
dimensions of the Box are width, height, depth. The class should have a method that can return the
volume of the box. Create an object of the Box class and test the functionalities.(CO1)
2. Create a base class Fruit which has name ,taste and size as its attributes. A method called eat() is
created which describes the name of the fruit and its taste. Inherit the same in 2 other class Apple and
Orange and override the eat() method to represent each fruit taste. (Method overriding)(CO1)
3. Write a program to create a class named shape. It should contain 2 methods- draw() and erase() which
should print “Drawing Shape” and “Erasing Shape” respectively. For this class we have three sub
classes- Circle, Triangle and Square and each class override the parent class functions- draw () and erase
(). The draw() method should print “Drawing Circle”, “Drawing Triangle”, “Drawing Square”
respectively. The erase() method should print “Erasing Circle”, “Erasing Triangle”, “Erasing Square”
respectively. Create objects of Circle, Triangle and Square in the following way and observe the
polymorphic nature of the class by calling draw() and erase() method using each object. Shape c=new
Circle(); Shape t=new Triangle(); Shape s=new Square(); (Polymorphism) (CO1)
4. Write a Program to take care of Number Format Exception if user enters values other than integer for
calculating average marks of 2 students. The name of the students and marks in 3 subjects are taken
from the user while executing the program. In the same Program write your own Exception classes to
take care of Negative values and values out of range (i.e. other than in the range of 0-100) (CO1)
5. Write a program that takes as input the size of the array and the elements in the array. The program
then asks the user to enter a particular index and prints the element at that index. Index starts from
zero.This program may generate Array Index Out Of Bounds Exception or NumberFormatException .
Use exception handling mechanisms to handle this exception. (CO1)
6. Implement Datagram UDP socket programming in java. (CO1,CO2)
7. Implement Socket programming for TCP in Java Server and Client Sockets.(CO1,CO2)
8. Write an applet for event handling which prints a message when clicked on the button.(CO1,CO2)
9. Write a program to Pass Parameters to Applet in Java. (CO1)
10. Creating a Simple Banner using Applet in Java.(CO1)
11. Implement Painting using mouseDragged() method of MouseMotionListener in Applet.(CO1)
12. Implement Producer-Consumer Problem using multithreading.(CO1)
13. Illustrate Priorities in Multithreading via help of getPriority() and setPriority() method.(CO1)
17. Create a database in MySQL using JSP and perform insertion and retrieval operations.(CO2)
18. Create a Java JSP login and Sign Up form with Session using MySQL.(CO2)
19. Implement Regular Expressions validation before submitting data in JSP.(CO2)
21. Implement form validation in marriage application input.html form page using JavaScript (CO2)