Ooad Lab Programs
Ooad Lab Programs
teacher
typist
officer
subject publication
speed
grade
regular
casual
daily wages
20. Write a java program to design three classes as student, exam and result define
appropriate data members, method members for them and write a interactive program to
model this relationship using inheritance.
21. Write a java application to illustrate polymorphism by taking graphical objects as classes.
22. Write a interactive program to illustrate hybrid inheritance through interfaces
Fig 9.1 page 236.
Assume that there are two different companies: one develops a student package and the
other develops a staff package containing relevant classess. Implement a simple
University system that makes use of classes/capabilities provided by these two packages.
23. Write a java program to implement packages using banking application.
24. Write a java application to demonstrate division by zero exception.
25. Write a java application to illustrate following exceptions
a. Class not found b. File not found
c. Number format
26. Write a java application to illustrate user-defined exception ****
27. Fig 10.30, page no: 280
Write a program that demonstrates handling of exceptions in inheritance tree. For example,
create a base class called Father and derived class called Son which extends the base class.
In Father class, implement a constructor which takes the age and throws the exception
WrongAge() when the input age<0. In Son class, implement a constructor that cases both father
and sons age and throws an exception if sons age is >=fathers age.
Write a program that reads a collection of words (say a statement) and prints words in
alphabetical order.
30. Fig 11.31
Write program that illustrates the use of Hashtable class for storing and retriving
employees records.
31. Write a java application to create an empty file.
32. Fig 12.32, page no 345
write a program which copies the contents of one file to a new file by removing
unnecessary spaces between words.
33. Fig 12.31
Write a simple program that searches for all the files(excluding the directories) with user-defined
name.
34. Write a java program to search for a given word in a file and list out number of times its
occurrence and print the line number along with its content.
35. Write a java interactive application to demonstrate thread priority.
36. Write a simple timer that can periodically print a time out message using threads.
37. Write a java program to demonstrate producer consumer problem using synchronized
methods.
38. Write a java program to display message using applets.
39. Write a java program to generate a simple calculator using applets.
40. Write a java program to play audio clip using applets.
41. Write a java program that can select only files with a .exe extension using applets from a
current directory.
42. Write a java applet to change the back ground color.
43. Write a java program to demonstrate PARAM.
44. Write a simple JDBC program that can establish a connection with database.
45. Write an interactive java program that can view required employee information from
employee database.
46. Write an interactive java program that can update the information of student database
using the statement class.
47. Write an interactive java program that can delete information from the student database
using prepared statement.