Java programs for LAB

1. Create customer database and write query to add new customer ,update customer details, display customers and add credit points to the customer based on their purchase amount.

2. Write a program to find the palindrome of the given string using stack.

3. Create Employee database and write query to add new Employee ,update Employee details and display pay roll information of an employee based on employeeID.

4. Write a program to find the first occurence of a string in the given text.

5. Create BOOK database and write query to add new author ,update author details and display book details based on author name or ISBN or title.

6. Write a program to count the number of times the word is repeated in the string.

7. Write a program to merge two files in to a third file.

8. Write a program to define employee class and show how the data can be hided and accessed.

9. Write a program to write an array of student objects in to a file and display the student information in the screen based on their register number from the file.

10. Write a program to add two 3 X3 matrices and to return the resultant matrix to the calling method.

10. Write a program to write an array of student objects in to a file and to append the student information to the same file.

11. Write a method to compute the sum of this geometric progression 1+x+x2+x3+………….+xn

12. Write a program to read a file and to edit the record of a particular student.

13. Write a program to set the thread priority and check thread priority level.

14. Write a program to write the student record in to a file and to delete the record of a particular student.

15. Write a program to sort N numbers.

16. Write a Time to read, add, subtract and display time. Time must be defined using hours, minutes and seconds.

17. Write a program to solve the producer and consumer problem using thread.

18. Write a program to use a player class and provide the following.
(i)Display players based on the tournament name.
(ii)Display the list of tournaments played by a player
(iii)Sort players based on their scores earned.
(iv)Assign and remove players to the tournament
b) Write a program to display text with 3 different colors and styles.

19. Create a class student. Inherit that into engineering, arts, commerce and science students.Inherit science student into UG and PG and further subdivided into computer science,
electronics and communication and mechanical. Provide methods for enrolment,examination result processing and granting degree to the students.

20. Create a Bill class for a supermarket. The bill objects contain bill number, item name with quantity and price , clerk name and total amount. Create a class that contain price for
each item. The price of an item is to picked from the class. The items in the bill are varying i.e. 1 to 30.

21. Write a program to change the color of the ball when the user clicks the ball using mouse.

22. Create a complex number class. overload the +, – , ++ and — operator on the real and imaginary part of the complex number.

23. Write a java program to simulate server-client communication using threads.

24. Write a stack class and overload the +(push) and -(pop) operation.

25. Write a program that creates the button , label (to display greeting) and listener class for a button that displays one of 10 randomly selected greetings.

26. Design a Shape class hierarchy and write a test program to demonstrate polymorphism.

27. Write a java program to change the shapes of the object by pressing the button.

28. Write a program to create online bank access. The features includes create account, credit amount, debit amount, check balance, throw exception on debit when balance crosses zero.

29. Write a program to handle events for a calculator with the following buttons i)add ii)subtract iii)multiply.



Leave a Reply