0% found this document useful (0 votes)
26 views4 pages

JAVA Programming Lab Assignments

Programming Assignments Question Java

Uploaded by

Richa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
26 views4 pages

JAVA Programming Lab Assignments

Programming Assignments Question Java

Uploaded by

Richa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

Sinhgad Technical Education Society’s

Sinhgad Institute of Management &


Computer Application (SIMCA)

Laboratory Workbook

Subject: Java Programming Lab

Course: MCA I - [Semester: I]

Prepared by,
<Student Name>
<Roll No.>
Program Index

Sr. Completio
Page
No Program n Date
No.
.
Installation of jdk environment & following utilities. What is
1.
javac, javap and javadoc.
2. Write a program to count the number of objects of a class.
Write a program to assign object reference variable to another
3.
and delete the reference to object and garbage collection.
Read only one parameter from command line argument and
4.
display the welcome message also check the length.
Create a class named 'Rectangle' with two data members
'length' and 'breadth' and two methods to print the area and
perimeter of the rectangle respectively. Its constructor having
parameters for length and breadth is used to initialize length
5. and breadth of the rectangle. Let class 'Square' inherit the
'Rectangle' class with its constructor having a parameter for its
side (suppose s) calling the constructor of its parent class as
'super(s,s)'. Print the area and perimeter of a rectangle and a
square.
Create a class named 'Member' having the following members:
Data members : Name, Age, Phone number, Address, Salary. It
also has a method named 'printSalary' which prints the salary of
the members. Two classes 'Employee' and 'Manager' inherits
6. the 'Member' class. The 'Employee' and 'Manager' classes have
data members 'specialization' and 'department' respectively.
Now, assign name, age, phone number, address and salary to
an employee and a manager by making an object of both of
these classes and print the same.
Design a java program using interface, which performs simple
7. arithmetic such as addition, subtraction, multiplication and
division.
Write a program having interface A containing two methods
meth1() and meth2(). interface B extends A which contain
8.
method meth3() and create one class which implements B. call
all the method and print the output.
Write a program to implement the polymorphism by creating
one superclass Beaches and three subclasses Mumbai,
9. Kanyakumari, Mangluru. Subclasses extend the superclass and
override its location() and famousfor() methods. Call the
location and famousfor methods of parent class i.e. beaches.
Write a program to implement a user defined exception
“NotPrime Exception”. Read number from command line and
10. cjheck whether the number is prime or not. If it is prime then
display message “Number is prime” and if it is not prime throw
the exception “NotPrimeException”.
11. Write a java code to create thread object and start it.
12. Write a program that creates and run the following threads-
1. To print letter ‘A’ 75 times.
2. To print letter ‘B’ 100 times.
3. To print integer 1 to 100.
13. Write a program to Create multiple Threads
14. Write a program to change name and priority of Thread
Design a program to create an *ArrayList*. Create a *Student*
class, assign rollno, name and marks to him using constructor.
15.
Store 5 objects of Student class in ArrayList. And display the
records of the students who has more than 60 marks.
Design a program to create an *LinkedList*. Create a Employee
class, assign emp_id, emp_name and emp_salary to him using
16.
constructor. Store 5 objects of Employee class in LinkedList.
Update the salary of the all the Employees with 10%.
17. Write the program to demonstrate the TreeSet class.
18. Write the program to demonstrate the HashMap class.
Write an Application to fill university examination form. Use text
box for name, mobile no, email id. Text area for address. List
19. box for city. Radio button for gender. Check box for subjects.
Combo box for course. Also display submit button. After clicking
submit button display report on console.
Design a program to open a frame, and on WindowClosing
20.
event close the frame window using adapter class.
Design a program to display a frame which shows x and y
21.
coordinates on Mouse move event using anonymous class.
Design a JDBC program to displays the details of employees
22. (eno, ename, department, sal) whose department is
Management
Design JDBC application for Student Feedback Form [Assume
23.
suitable table structure].
Design a java program to accept the empno from user and
update the salary of employee and display the updated record
24.
on screen. Hint employee table has fields empno, ename,
address, desg, salary.
25. Design a servlet program illustrating its lifecycle
Design a servlet application to insert records of the Book
Publishers into database table and display record in tabular
26.
format. Assume suitable structure. Design HTML, web.xml,
servlet class.
Design a servlet code, to create and add cookie on client’s
27. machine, that stores username, current date and display the
same.
Create a bean class of employee sets it’s all the property by
28. using JSP code. Create HTML page to accept employee
information.
Design a program to create HTML form with two text box to
enter numbers. When page is submitted to JSP, it calculate
29.
division of given no. if denominator is zero then generate an
error page.
Design a JSP code to connect to a database via bean class.
30.
Display the details of Book table.

You might also like