You are on page 1of 2

enable

configure terminal
int s1/0
ip address 10.0.0.1 255.255.255.0
do show ip int brief
no shutdown
end
show ip interface brief
show startup-config
show running-config
copy run start
show ip routes
Dept. of Information Science and Engineering
Sri Jayachamarajedra College of Engineering
B.E. 5th Semester, Information Science and Engineering
IS550 JAVA and J2EE - Laboratory work
Write your own methods and classes.
Do not use built in packages and interfaces for basic data structures and algori
thms.
1. Implement linear search :
1. using recursion.
2. using iteration.
Write methods to sort.
2. Implement binary search :
1. using recursion.
2. using iteration.
Write methods to sort and search.
3. Implement linked list showing all the basic operations.
4. Implement doubly linked list showing all the basic operations.
5. Write a program to construct heap.
6. Implement dynamic stack and queue showing all the basic operations.
7. Implement priority queue showing all the basic operations.
8. Write a program to multiply two matrices using multithreading.
9. Implement an abstract class named Person and two subclasses named Student and
Employee. A person has
a name, address, phone number and e-mail address. A student has a class status (
freshman, second year junior
or senior). Define the status as a constant. An employee has an office, salary a
nd date-hired. Implement the
above classes. Provide Constructors for classes to initialize private variables.
Override the toString method
in each class to display the class name and the persons name. Write an applicati
on to create objects of type
Student and Employee and print the persons name and the class name of the object
s.
10. Write a program to show that private member of a super class cannot be acces
sed from derived classes.
11. Write a program in Java to create a Player class. Inherit the classes Cricke
t Player, Football Player and
Hockey Player from Player class.
c Dept of ISE, SJCE, Mysore 2014 [Next problem statement overleaf ]
2
12. Write a class Worker and derive classes DailyWorker and SalariedWorker from
it. Every worker has a
name and a salary rate. Write method ComPay (int hours) to compute the week pay
of every worker. A
Daily Worker is paid on the basis of the number of days she/he works. The Salari
ed Worker gets paid the wage
for 40 hours a week no matter what the actual hours are. Test this program to ca
lculate the pay of workers.
You are expected to use the concept of polymorphism to write this program.
13. Consider the trunk calls of a telephone exchange. A trunk call can be ordina
ry, urgent or lightning. The
charges depend on the duration and the type of the call. Writ a program using th
e concept of polymorphism
in Java to calculate the charges.
14. Write a program to make a package Balance in which has Account class with Di
splay Balance method in
it. Import Balance package in another program to access Display Balance method o
f Account class.
15. Create an Interface having two methods division and modules. Create a class,
which overrides these methods.
16. Write a program in Java which implements interface Student which has two met
hods Display Grade and
Attendance for PG Students and UG Students (PG Students and UG Students are two
different classes
for Post Graduate and Under Graduate students respectively).
17. Write a program in Java to display the names and roll numbers of students. I
nitialize respective array variables
for 10 students. Handle ArrayIndexOutOfBoundsExeption, so that any such problem
doesnt cause illegal
termination of program.
18. Write a program to solve N queens problem. Provide solution applying branch
and bound, and backtracking
methods. Provide necessary GUI to display the solution.
19. Write a Java program to enable the user to handle any chance of divide by ze
ro exception.
20. Create an exception class, which throws an exception if operand is nonnumeri
c in calculating modules. (Use
command line arguments).
21. On a single track two vehicles are running. As vehicles are going in same di
rection there is no problem. If
the vehicles are running in different direction there is a chance of collision.
To avoid collisions write a Java
program using exception handling. You are free to make necessary assumptions.
22. Write a program for generating 2 threads, one for printing even numbers and
the other for printing odd numbers.
23. Write a Java Applet program which reads your name and address in different t
ext fields and when a button
named find is pressed the sum of the length of characters in name and address is
displayed in another text
field.
[End of problems list]

You might also like