You are on page 1of 4

# INDEX

Lab Exercise 1

1.
Program in java to generate the next 10 Fibonacci
numbers starting from the number that the user
specifies.

2
2.
Program in java to accept the year entry from user
and then display whether the entered year is a leap
year or not.

3
3.
Program in java to generate all the prime numbers
less than the value entered by the user.

4
4.
Program in java to calculate the factorial of the
entered number.

5
5.
Program in java to find the sum of digits of the
number entered by the user.
6
6.
Program in java to ask the user to enter a number
and print its digits in reverse order.
7
7.
Program in java to print the next 15 even number
series from the specified number in the series.
8
8.
Program to find the number of and sum of all
integers greater than 50 and less than 350 that are
divisible by 3.

9
9.
Program in java to accept a character from the user
and print whether the entered character is a vowel
or not.
10
S.No TITLE Page no.

10.
Program in java that accepts a number between 0
and 10 along with a string. Display the string the
number of times specified.
12
11.
Program in java to accept marks from the user and

13
12.
Designing a class to convert the entered temperature
in Centigrade to its Fahrenheit equivalent.

15
13.
Designing an Employee class which takes input from
the user for 5 different employees emp_code, name
and salary and then display all the three attributes
of those employees.

16
14.
Program for Pizza Ordering Process.
18
15.
Designing a Geometry Calculator that will calculate
the area of circle, rectangle and triangle.

22
16.
Writing a Television class having television
attributes like power, volume, size etc. and methods
to set and get all these parameters.
26

Lab Exercise 2

1.
Program in java to accepts 10 numbers from the
user and then sort them in ascending and
descending order according to the choice of the user.

34
2.
Designing a class in java to accept 10 numbers from
the user and at the end display the largest and the
lowest of all.

37

39
4. Creating a package and use it in your program to
perform different functions like addition, subtractions,
multiplication and division.
41

5. Creating an M by N array.

43
6. A) Writing a program in java using arrays to get the
output in a pattern.
48
B) In a star pattern. 49
7. Program in java to implement method overriding.

51
8. Program in java to implement multiple inheritance.

53
9. Program that has an interface student containing
abstract functions-studentaccept and studentdisplay and
corporate course.
55
10. Program in java to perform String Handling. 59
11. Program to find out whether string entered by user is
palindrome or not.

62
12. Program to take your name as input and display the
reverse of it.
63
13. Program to perform functions of vector. 64
14. Program to draw human face using applet. 65
15. Program to display the functioning of steps involved in
different states of the applet creation.

66
16. Designing a calculator in java which could perform all
the functions such as addition, subtraction,
multiplication, division, square root.

67
17. Program in java to draw different figures using
different colors. The choice of the figure and color will
depend on the user.
73

Lab Exercise 3

1. Program to depict use of try catch and finally blocks.

76
2. Program to catch divide by 0 exception.

77
3. Program to depict nested try catch block.

78
4. Program to define and throw InvalidRange Exception if
the minimum number is greater than maximum
number.

79
5. Program that creates three Threads from the Main class
and suspends their execution in sequential order.
80
6. Sample Java Program depicting the use of wait, notify