Saturday, January 9, 2010

Java Lab Manual

1. Write a Java program that prints all real solutions to the quadratic equation ax2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant
b2 -4ac is negative, display a message stating that there are no real solutions.

2. The Fibonacci sequence is defined by the following rule. The fist two values in the sequence are 1 and 1. Every subsequent value is the run of the two values preceding it. Write a Java program that uses both recursive and non recursive functions to print the nth value in the Fibonacci sequence.

3. Write a Java program that prompts the user for an integer and then prints out all prime numbers up to that. Integer.

4. Write a Java program that checks whether a given string is a palindrome or not. Ex: MADAM is a palindrome.

5. Write a Java program for sorting a given list of names in ascending order.

6. Write a Java program to multiply two given matrices.

7. Write a Java Program that reads a line of integers, and then displays each integers, and the sum of all the integers (use stringtokenizer class.

8. Write a Java program that reads on file name from the user then displays information about whether the file exists, whether the file is readable, whether the file is writable, the type of file and the length of the file in bytes.

9. Write a Java program that reads a file and displays a file and displays the file on the screen, with a line number before each line.

10. Write a Java program that displays the number of characters, lines and words in a text file.

11. Write a Java program that:Implements stack ADT.

12. Write an applet that displays a simple message.

13. Write an applet that computes the payment of a loan based on the amount of the loan, the interest rate and the number of months. It takes one parameter from the browser: Monthly rate; if true, the interest rate is per month; other wise the interest rate is annual.

14. Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the + - X % operations. Add a text field to display the result.

15. program for handling mouse events.

16. Write a java program for creating multiple threads.

17. Write a Java program that correctly implements producer consumer problem using the concept of inter thread communication.

18. Write a Java program that lets users create Pie charts. Design your own user interface (with swings & AWT)

19. Write a Java program that allows the user to draw lines, rectangles and ovals.

20. Write a Java program that implements a simple client/server application. The client sends data to a server. The server receives the data, uses it to produce a result, and then sends the result back to the client. The client displays the result on the console. For ex: The data sent from the client is the radius of a circle, and the result produced by the server is the area of the circle.

21.Write a Java program that illustrates how run time polymorphism is achieved.

Download All Programs With The Following Link:

http://www.ziddu.com/download/8087586/java_lab_manual.doc.html

No comments:

Post a Comment

  © For Movies Click Here Softwares by For Games Click Here 2010

Back to TOP