KEMBAR78
Java Lab Manual | PDF | Constructor (Object Oriented Programming) | Programming
0% found this document useful (0 votes)
5 views5 pages

Java Lab Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Java Lab Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Programming Lab of JAVA

 WAP to input two numbers and find its sum.


 WAP to input principal amount, rate and time. Calculate its simple interest and
compound interest.
 WAP to input the radius of any circle and find its area and perimeter.
 WAP to input a number and check it is positive or negative.
 WAP to input the marks of three subject (Out of 100) and calculate its percentage,
total marks,total distinction in subjects and display fail if he/she gets marks less
than 30 in any one of the subjects.
 WAP to input three numbers and find the greatest
(i) By using nested if statement
(ii) By using Ternary Operator
 WAP to input two numbers and perform addition, substraction and multiplication
by using switch statement.
 WAP to implement relational operator.(>,<,<=,=>,==,!=)
 WAP to implement bitwise operators.(&,|,^,~)
 WAP to implement shift operators. (<<,>>)
 WAP to display odd and even numbers between 5 to 50 and also display its sum
separately.
 WAP to display and the sum of all numbers between 15 to 100, which is divisible
by 7.
 WAP to input two numbers and swap them
(I) By using third variable.
(II)Without using third variable (Two methods)
 WAP to implement the following series:-
(1) 1 3 5 7 9 11
(2) 2 5 10 17 26 37
(3) 0 6 24 60 120 210
(4) 2 10 30 68 130 222
(5) 1 2 4 8 16 32

 WAP to find the sum of the Series:-


(1) 1 + ½ +1/3 +1/4 +………. +1/n
(2) ½ + 2/3 + ¾ +…….. + n/n+1
(3) 1+ 2/2! + 3/3! +……. + n/n!
(4) 1 + 1/3 + 1/5 + ……up to n- terms.
 WAP to create your own package and use it in your program.
 WAP to input a number and check it is prime or not.
 WAP to input a number and check it is palindrome or not.
 WAP to display all Armstrong numbers between 123 to 999.
 WAP to input a number and find all the prime number between 5 to 100.
 WAP to input a number and find its reverse.
 WAP to input a number and find the sum of all its digits.
 WAP to input a decimal number and convert it into binary.
 WAP to input a binary number and convert it into decimal.
 WAP to input an octal number and convert it into decimal.
 WAP to input a decimal number and convert it into octal.
 WAP to input the elements of array and sort them by using selection sort.
 WAP to input a key element and search it from the given array.
 WAP to find the greatest and smallest element of the array.
 WAP to enter a number and find its factorial by using recursion.
 WAP to enter three numbers and find its GCD by using recursion.
 WAP to generate Fibonacci series by using recursion.
 WAP to input the elements of 3X3 matrix and display in matrix format.
 WAP to input the elements of 3X3 matrix and check it is symmetric or not.
 WAP to input the elements of 3X3 matrix and display the principal and reverse
diagonal elements of the matrix.
 WAP to input the elements of 3X3 matrix and check it is sparse or dense.
 WAP to perform addition, substraction and multiplication of two matrix.
 WAP to implement all the pre-defined methods related to String .
 WAP to enter a string and perform:-
(1) the length of string
(2) reverse of string
(3) number of vowels
 WAP to implement default constructor.
 WAP to implement parametric constructor.
 WAP to implement constructor overloading.
 WAP to calculate factorial of any number by using default constructor.
 WAP to generate the following series by using default constructor
(1) 0 1 1 2 3 5 …… up to n terms.
(2) 2 3 5 8 13 21 …….. up to n terms.

 WAP to input n and r and implement permutation and combination.


 WAP to implement method overloading.
 WAP to implement single inheritance.
 WAP to implement multiple inheritances by using interface class.
 WAP to implement multilevel inheritance.
 WAP to implement hierarchal inheritance.
 WAP to implement abstract class.
 WAP to create your own package and use it in your program.
 WAP to implement exception handling:-
(1) by using ArithmeticException
(2) by using ArrayIndexOutOfBoundsException
(3) by using NumberFormatException
(4) by using InputMismatchException
 WAP to implement Multithreading by using different methods like
run(),sleep(),getPriority(),setPriority(),getName(),setName().
 WAP to implement Applet :-
(I) By using Font and Color class
(2)By using different geometrical Methods.

You might also like