You are on page 1of 5

CARMEL SCHOOL, MADHUPUR

Project Work (Computer Applications)


2021-22
STD : X Date of submission : 18.10.2021

1. Write a class with name employee and basic as its data member, to find the gross pay of an
employee for the following allowances and deduction.
Use meaningful variables.
Dearness Allowance = 25% of Basic Pay
House Rent Allowance = 15% of Basic Pay
Provident Fund = 8.33% of Basic Pay
Net Pay = Basic Pay + Dearness Allowance + House Rent Allowance
Gross Pay = Net Pay – Provident Fund
2. Write a program in Java to accept the sides of a triangle and display whether it is an Equilateral or
Isosceles or a Scalene triangle.
3. Write a program in Java to accept three sides of a triangle and check whether the triangle is
possible or not.
4. Write a program in Java to display the colour of the spectrum (VIBGYOR) according to the user’s
choice (Switch case statement).
5. WAP in Java to accept a number and check:
(a) Whether the number is divisible by 2 and 5
(b) Whether the number is divisible by 2 but not by 5
(c) Whether the number is divisible by 5 but not by 2
The program must display the message accordingly.
6. Write a program using switch case to find the volume of a cube, a sphere and a cuboid. For an
incorrect choice, an appropriate error message should be displayed.
(Hint : Volume of a cube = s*s*s
Volume of a sphere = 4/3 *π*r*r*r
Volume of a cuboid = l*b*h)
7. Write a program in Java to find the factorial of 10.
[ 10! (Factorial) = 10*9*8* ………….. *1]
8. WAP in Java to find the sum of the series
S = 1/2 - 2/3 + 3/4 - ……………………………. – 10/11
9. WAP in Java to find the sum of the series
S = 1 + 1/2! + 1/3! + 1/4! + ……………………. + 1/10!
10. WAP in Java to find the sum of the series
S = 1 + a2/1 +a3/2 + a4/3 + ……………….. to n terms
11. WAP in Java to find the sum of the series
S = + + + …………………………. to n terms
12. WAP in Java to display the first 10 numbers of the Fibonacci series 0,1,1,2,3,…………
13. WAP in Java to accept a number and check whether the number is prime or not.
14. WAP in Java to accept two numbers and find the H.C.F. of the two numbers.
15. WAP in Java to accept a number and find all the factors (including 1 and excluding the number
itself) of that number.
Sample Input : 15
Sample Output : Factors of 15 = 1,3,5
16. WAP in Java to display first eight numbers of the series
1, 11, 111, 1111, 11111, ……………
17. Write a program to accept a number from the user and check whether it is a Palindrome number
or not.
(A number is a Palindrome which when reads in reverse order is same as in the right order).
18. Write a program to input a line and display only numeric tokens.
Sample Input : 26 January 1950 is celebrated as Republic day.
Sample Output : 26 1950
19. Write a program to input a line from the console. The program counts and displays the total
number of uppercase and lowercase characters present in the String.
20. Write a program in Java to accept the number of days and display the result after converting into
number of years, number of months and the remaining number of days.
21. Write a program to print the sum of negative numbers, sum of positive odd numbers and sum of
positive even numbers from a list of numbers entered by the user. The list terminates when the
user enters a zero.
22. WAP in Java to print the given pattern
a
a a
a a a
a a a a
a a a a a
23. WAP in Java to accept a string and count the number of vowels present in the string
Sample Input : Carmel School
Sample Output : The number of vowels = 4
24. Write a program in Java to accept a word in lower case and replace ‘e’ with ‘*’ present in the word.
Sample Input : percentage
Sample Output : p*rc*ntag*
25. WAP in Java to accept a string and change the case of each character of the string and display the
new string
Sample Input : Computer Application
Sample Output : cOMPUTER aPPLICATION
26. WAP in Java to accept a string and find:
(i) number of blank spaces in the string
(ii) number of words in the string
(iii) number of characters present in the string

27. WAP in Java to accept a name (Containing three words) and display the initials along with the
surname.
Sample Input : Subhash Chandra Bose
Sample Output : S.C.Bose
28. WAP in Java to accept a String and find the frequency of a word entered by the user in a String.
However, the word should not be a part of a String.
Sample Input : Tata Steel is one of the leading Steel manufacturing company in the country.
Frequency of the word to be searched : the
Sample Output : 2
29. WAP in Java to accept a character and check the case (upper/lower) otherwise check whether it is
a digit or a special character.
Sample Input : Enter a character
H
Sample Output : H is a upper case letter
30. WAP in Java to accept a word and display the same in Pig Latin form.
Sample Input : trouble
Sample Output : oubletray
Pig Latin : A word is said to be in Pig Latin which is obtained by framing a new word with the first
vowel present in the word with the remaining letters present before the first vowel and ended
with ‘ay’.
31. WAP in Java to enter a String. Print the String in alphabetical order of its alphabets.
Sample Input : COMPUTER
Sample Output : CEMOPRTU
32. WAP in Java to accept a string in lower case. Convert all the first characters of the String in upper
case and display the new String.
Sample Input : computer applications with bluej
Sample Output : Computer Applications With Bluej
33. WAP in Java to assign 10 different numbers in a Single Dimensional Array and display the
maximum and the minimum number of the array elements.
34. WAP in Java to accept 20 different numbers in a Single Dimensional Array. Display the sum of all
the numbers which are divisible by either 3 or 5.
35. WAP in Java to accept 10 different numbers in a Single Dimensional Array. Enter a number and
search whether the number is present or not in the list of array elements by using the ‘Linear
Search’ technique.
36. WAP in Java to accept 10 different numbers in a Single dimensional Array. Enter a number and by
using binary search technique, check whether or not the number is present in the list of array
elements. If the number is present then display the message “Search Successful” otherwise,
display “Search Unsuccessful”.
37. WAP in Java to accept 20 integer numbers in a SDA. Find and display the following:
(i) Number of even numbers.
(ii) Number of odd numbers.
(iii) Number of multiples of 4.
38. WAP using a method Number () to perform the following tasks:
i. Accept a number and check whether it is a ‘Buzz’ number or not. A number is said to ‘Buzz’, if it is
divisible by 7 or ends with 7.
ii. Accept a number and check whether it is composite number or not. A composite number has
more than one factor (excluding 1 and the number itself).
39. An automorphic number is the number which is contained in the last digit(s) of its square. Write a
program in Java to accept a number and check whether it is an Automorphic number or not, using
function name digits (int n) which returns number of digits present in the number.
e.g. 25 is an Automorphic number as its square is 625 and 25 is present as the last two digits.
40. Write a program in Java to interchange the value (swap) of the two numbers a and b and display
the result after swapping.
Use overloaded methods display (int, int) and display (float, float) for swapping integer and float
type values.
41. WAP by using a class with the following specifications :
Class name : Prime
Data members/instance variables : int n
Member Methods :
Prime () : default constructor to initialize n
void input (int x) : to assign n with x
void display () : to check whether the number is prime or not
42. WAP by using a class with the following specifications :
Class name : Profit_Loss
Data members/instance variables : int cp, sp
Member Methods :
Profit_Loss () : default constructor to initialize cp ,sp
void input (int a, int b) : to assign cp with m and sp with n
void display () : to calculate and display either profit percent (pp) or loss percent (lp)
43. WAP in Java to accept a number and check whether the number is Spy number or not.
(A number is said to be a Spy number if the sum of all the digits is equal to the product of all digits.)
44. WAP in Java to print the given pattern :
*
* #
* # *
* # * #
* # * # *
45. WAP in Java to print the given pattern :
* * * * 1
* * * 2
* * 3
* 4
5
46. WAP in Java to print the given pattern :
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
47. WAP to check whether a given number is perfect number or not.
(A number is called a perfect number if the sum of its divisors is equal to the number. The sum of
divisors excludes the number.)
48. WAP in Java to input a number and print whether the number is a special number or not.
(A number is said to be a special number, if the sum of the factorial of the digits of the number is
same as the original number.)
Example : 145 is a special number
49. A special two digit number is such that when the sum of its digits is added to the product of its
digits, the result is equal to the original two digit number.
Example : Consider the number = 59
Sum of digits = 5 + 9 = 14
Product of its digits = 5 X 9 = 45
Sum of the sum of digits and product of digits = 14 + 45 = 59
WAP to accept a two digit number. Add the sum of its digits to the product of its digits. If the value
is equal to the number input, output the message “Special 2 digit number” otherwise, output the
message “Not a special 2 digit number.”
50. WAP in Java to accept a number and check and display whether it is a Niven number or not.
(Niven number is that number which is divisible by its sum of digits.)
Example : 126
Sum of its digits is 1 + 2 + 6 = 9 and 126 is divisible by 9.
51. WAP in Java to accept a number and check and display whether it is a Neon number or not.
(Neon number is that number where the sum of square of the number is equal to the number.)
Example : 9
Its square is 9 * 9 = 81 and sum of the digits is 8 + 1 = 9.



You might also like