Vous êtes sur la page 1sur 4

KSWU, Bijapur JAVA/J2EE Lab Assignments MCA V Sem 2014-15

Subject In-Charge: Megha B. Halasangimath Page Number: 1



JAVA/J2EE LAB ASSIGNMENTS
JAVA LAB PROGRAMS
1. Write a java program to read the values from keyboard of different data types.
2. Write a java program to implement the basic calculator.
3. Write a java program to implement the areas of different shapes with the following menu:
Menu
--------
1. Area of Rectangle
2. Area of Square
3. Area of Triangle
4. Area of Circle
5. Exit
4. Write a java program to find the sum and average of given numbers passed through command line
arguments
5. Write a java program to get the info of a person from command line argument and display it.
6. Write a java program to implement different trigonometric functions
7. Write a java program to implement the ceil(), floor (), round() and abs() functions
8. Write a java program to demonstrate the declaration and reading of an array.
9. Write a java program to demonstrate the declaration and using of 2 dimensional arrays.
10. Write a java program to demonstrate type casting.
11. Write a java program to test whether a given number is prime or not
12. Write a java program to calculate the simple interest
13. Write a java program to calculate the compound interest
14. Write a java program to calculate the factorial of a given number
15. Write a java program to check the given number is odd or even
16. Write a java program to check the given number is positive or negative
17. Write a java program to calculate the gcd of two given numbers
18. Write a java program to calculate the gcd of three given numbers
19. Write a java program to find the number of arguments provided at runtime
20. Write a java program to find the first n Fibonacci numbers
21. Write a java program to convert the given temperature from Fahrenheit to Celsius
22. Write a java program to convert the given temperature from Celsius to Fahrenheit
23. Write a java program to reverse a given number
24. Write a java program to check whether a given number is palindrome or not
KSWU, Bijapur JAVA/J2EE Lab Assignments MCA V Sem 2014-15


Subject In-Charge: Megha B. Halasangimath Page Number: 2

25. Write a java program to produce the following pattern
*
**
***
****
*****
26. Write a java program to produce the following pattern
*
* *
* * *
27. Write a java program to print Floyds Triangle
1
23
456
78910
28. Write a java program to demonstrate the enumeration data type
29. Write a java program to design a class constructor
30. Write a java program to demonstrate the design of multiple classes
31. Write a java program to demonstrate constructor overloading
32. Write a java program to demonstrate method overloading
33. Write a java program to demonstrate inheritance with some real time example like bank
34. Write a java program to demonstrate exception handling (using nested try catch and finally)
35. Write a java program which uses FileInputStream/ FileOutputStream classes
36. Write a java program to create a package that access the member of external class as well as same package.
37. Write a java program that imports the user defined package and access the Member variable of classes that
contained by package
38. Write a java program to demonstrate multiple inheritance
39. Write a java program which writes a object to a file( use transient variable also)
40. Write a java program to demonstrate the use of threads
41. Write a java program to create a thread that implements the Runable Interface
42. Write a java applet program to display a Hello message
43. Write a java applet program to which handles MouseEvent
44. Write a java applet program to which handles KeyBoardEvent
45. Write a java program to implement RMI
46. Write a java program to draw the line, rectangle, oval, text using graphics method
47. Write a java program to create menu using the frame
KSWU, Bijapur JAVA/J2EE Lab Assignments MCA V Sem 2014-15


Subject In-Charge: Megha B. Halasangimath Page Number: 3

48. Write a java program to create the dialog box
49. Write a java program to implement the flow layout and border layout
50. Write a java program to implement the GridLayout, CardLayout
51. Write a java program to create a Frame that displays the Student Information
52. Write a java program to demonstrate System Clock.

KSWU, Bijapur JAVA/J2EE Lab Assignments MCA V Sem 2014-15


Subject In-Charge: Megha B. Halasangimath Page Number: 4

J2EE LAB PROGRAMS
1. Write a java Servlet program to implement a dynamic HTML using servlet (username and password should
be accepted using HTML and displayed using a Servlet)
2. Write a java Servlet program to download a file and display it on the screen (A link has to be provided in
HTML, when the link is clicked corresponding file has to be displayed on screen)
3. Write a java Servlet program to implement RequestDispatcher object (use include() and forward()
methods)
4. Write a java Servlet program to implement and demonstrate get() and Post () methods (using HTTP servlet
class)
5. Write a java Servlet program to implement sendRedirect() method (using HTTP Servlet class)
6. Write a java Servlet program to implement sessions (using HTTP Session Interface)
7. Write a java jsp program to print 10 even and 10 odd numbers
8. Write a java jsp program to implement verification of a particular user login and display a welcome
message
9. Write a java jsp program to get student information through a HTML and create a JAVA Bean Class,
populate Bean and display the same information through another JSP
10. Write a java jsp program which uses <jsp:plugin> tag to run a applet
11. Write a java jsp program which implements nested tags and also uses TagSupport Class