Computer Applications Assignments
(Class X)
LAB QUESTIONS
Question 1 (29.6.25): Taylor Series X - vars: int n, n - void accept() which will initialize n & b,
double sumSeries() returns the sum of series
● S = x²/2! - x²/4! + x⁴/6! .... (n terms) where 2 < n < 9
Question 2 (29/7/25): Design a class to overload the function "print" as follows:
● void print() - to print the following format: 1111, 3333, 5555, 2222
● void print(int a) - to check whether the no. is a neon no. or not?
○ A neon no. is the one whose sum of digits of its square is equal to the original no.
E.g: 9
Question 3 (19/8/25): WAP to input a String & replace the vowels with characters next to it in
English alphabet
Question 4 (14.10.25): WAP to abbreviate a name & print.
Question 5 (14.10.25): Mix two words of same length & form a new word in such a way that the
first character of 2nd word is followed by first character of 1st word & so on.
Question 6 (14.10.25): WAP to accept a string & check whether it's a strong password or not.
Criteria:
● i) Min length should be 15
● ii) at least 3 uppercase char
● iii) at least 3 lowercase char
● iv) No space should be permitted
● v) at least 3 special char
● vi) at least 4 digits should be present
Question 7 (2/8/25): WAP to input a word & to convert all the vowels to 'V', consonant to 'C'.
Leave other characters unchanged & print the modified word.
Question 8 (23/10/25): Create an array to store ‘n’ integers. Print the smallest element along
with its position.
Question 9 (30/10): Create an array to store names of 10 students. Arrange the names in
ascending order using bubble sort. Print the sorted list.
Question 10 (30/10): Create an array to store percentages of 50 students. Arrange the
percentages in descending order using selection sort. Print the sorted list.
Question 11: Create an array to store 80 random numbers in the range 1-80. Input a no to
search. If found, print the "found" message. If not found print "not found" message.
Question 12 (6.11.25): Store 10 numbers each in two arrays A[] and B[]. Check if the arrays are
identical or not?
Question 13: Store 20 numbers as array A[]. Copy all the prime numbers from them to array P[]
- Print array P[].
Question 14: Store 10 names in an array and arrange the names lexicographically.
Question 15 (15.11.25): Input 16 nos in a DD array of size 4x4. Find the data sum of the
elements of the diagonals.
Question 16 (15.11.25): Store names of 20 students who are seating in a class in 5 rows and 4
cols. Input a name to search and print the place of that student. In case the name is not found,
print "not found".
Question 17 (15.11.25): Store 20 nos in a double dimensional array of size 5x4. Find the
position of the smallest element and the largest element of the array.
MORE QUESTIONS…
ASSIGNMENT-1
Design a class with the following specifications:
● Class name: Student
● Member variables:
○ name: name of student
○ age: age of student
○ marks: marks obtained
○ stream: stream allocated
○ (Declare the variables using appropriate data types)
● Member methods:
○ void accept(): Accept name, age, and marks using methods of Scanner class.
○ void allocation(): Allocate the stream as per the following criteria:
Marks Stream
>= 300 Science and Computer
>= 200 and < 300 Commerce and Computer
>= 75 and < 200 Arts and Animation
< 75 Try Again
●
void print(): Display student name, age, marks, and stream allocated.
● Main Method: Call all the above methods in the main method using an object.
ASSIGNMENT-2 (Telephone Bill)
Design a class with the following specifications:
● Class name: Telephone
● Member variables:
○ name: Customer name
○ prv: Previous call reading
○ pre: Present call reading
○ call: No. of calls
○ amt: Bill amount
○ total: Total bill amount
● Member methods:
○ void input(): Accept name, prv, and pre using methods of Scanner class.
○ void cal(): Calculate Telephone bill amount as per following criteria:
No. of calls Call rate
Upto 100 0.0
101 to 200 0.9 per call above 100
201 to 400 0.8 per call above 200
Above 400 0.7 per call above 400
● Additional amount Rs. 180/- must be paid by all customers as service charge.
● void print(): Display customer name and total bill amount.
● Main Method: Call all the above methods in main method using an object.
ASSIGNMENT-3
Design a class Overloading and a method display() as follows:
● (a) void display(String str, int p): with one String argument and one integer argument. It
displays all the uppercase characters if 'p' is 1 (one) otherwise, it displays all the
lowercase characters.
● (b) void display(String str, char chr): with one String argument and one character
argument. It displays all the vowels if chr is 'v' otherwise, it displays all the alphabets.
● Also write a main() function to input parameters and call the overloaded functions.
ASSIGNMENT-4
Design a class to overload a function series() as follows:
● (a) void series(int a, int n): To display the sum of the series given below:
○ a/2! + a/3! + a/4! + ... n terms
● (b) void series(int n): To display the sum of the series given below:
○ 1/2 - 2/3 + 3/4 - 4/5 + ... n terms
● Write a main method to create an object and invoke the above methods.
ASSIGNMENT-5
Define a class to accept a number and check whether it is a SUPERSPY number or not.
A number is called SUPERSPY if the sum of the digits equals the number of the digits.
ASSIGNMENT-6
Define a class to accept a number from user and check if it is an EvenPal number or not.
(A number is said to be EvenPal number when number is palindrome number (a number is
palindrome if it is equal to its reverse) and sum of its digits is an even number. Example: 121)
ASSIGNMENT-7
A Tech number has even number of digits. If the number is split in two equal halves, then the
square of sum of these halves is equal to the number itself. Write a program to generate and
print all four digits tech numbers. 70
ASSIGNMENT-8
Write a program in Java to input 'n' numbers in an array. Find and print the largest and smallest
number with their positions.
ASSIGNMENT-9
Write a program in Java to input 'n' numbers in an array in sorted order. Input another number to
search in that array using binary search method.
ASSIGNMENT-10
Write a program in Java to input 'n' names in an array. Arrange the array in descending order
using Selection sort technique. Print the array.
ASSIGNMENT-11
Write a program in Java to input Roll no. and Total marks for 'n' number of students in two
different arrays. Arrange the Roll no.s in descending order of Total marks. Finally display the
sorted lists.
ASSIGNMENT-12
Write a program in Java to input 'n' numbers in an array. Transfer and store all the even
numbers in an array even[] and all the odd numbers in another array odd[]. Finally, print the
elements of both the arrays.
ASSIGNMENT-13
Write a program in Java to input numbers in a 2D array of size NxN. Print both the diagonals
and their sums.
ASSIGNMENT-14
Write a program in Java to input numbers in a 2D array of size NxN. Print only the boundary
elements.
ASSIGNMENT-15
Write a program in Java to input numbers in a 2D array of size NxN and print the sum of each
row and product of each column. 80