0% found this document useful (0 votes)
28 views6 pages

X 25 Record Programs

The document outlines programming tasks for a computer applications course for the academic year 2025-2026. It includes various exercises such as calculating bank interest rates for term deposits, generating prime numbers, implementing classes for loans and fruit juices, and performing operations like sorting and searching on arrays. Additionally, it covers string manipulation tasks and pattern generation using user-defined inputs.
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)
28 views6 pages

X 25 Record Programs

The document outlines programming tasks for a computer applications course for the academic year 2025-2026. It includes various exercises such as calculating bank interest rates for term deposits, generating prime numbers, implementing classes for loans and fruit juices, and performing operations like sorting and searching on arrays. Additionally, it covers string manipulation tasks and pattern generation using user-defined inputs.
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/ 6

X – COMPUTER APPLICATIONS - RECORD PROGRAMS – 2025-2026

1. A bank announces new rates for Term Deposit Schemes for their customers and Senior Citizens as given
below:

Term Rate of Interest (General) Rate of Interest (Senior Citizen)

Up to 1 year 7.5% 8.0%

Up to 2 years 8.5% 9.0%

Up to 3 years 9.5% 10.0%

More than 3 years 10.0% 11.0%

The 'senior citizen' rates are applicable to the customers whose age is 60 years or more. Write a program to
accept the sum (p) in term deposit scheme, age of the customer and the term. The program displays the
information in the following format:

Amount Deposited Term Age Interest earned Amount Paid

xxx xxx xxx xxx xxx

2. Write a program to display twenty simultaneous Prime Number, starting from a given number, entered by
the user.

Sample Input : 8

Sample Output : 11, 13, 17, 19, …….

3. Write the program to display the following pattern according to user’s choice:
Using Switch statement.
TYPE 1 TYPE 2
1 5 5 5 5 5
2 3 4 4 4 4
4 5 6 3 3 3
7 8 9 10 2 2
11 12 13 14 15 1
1
4. Bank charges interest for the vehicle loan as given below:

Number of years Rate of interest

Up to 5 years 15%

More than 5 and up to 10 years 12%

Above 10 years 10%

Write a program to model a class with the specifications given below:

Class name: Loan

Data Members Purpose

int time Time for which loan is sanctioned

double principal Amount sanctioned

double rate Rate of interest

double interest To store the interest

double amt Amount to pay after given time

Member Methods Purpose

void getdata() To accept principal and time

To find interest and amount.


void calculate() Interest = (Principal*Rate*Time)/100
Amount = Principal + Interest

void display() To display interest and amount

2
5. Write two separate program to define class with the following specifications:

i) Write a program to accept a number and check whether the number is palindrome or not by using the
method name int reverse (int n). The method returns the reversed number to the main program that checks the
palindrome number.

ii) A number is said to be Automorphic number if its square ends in the same digits as the number itself.

For example,

5 and 25 appear at the end of their squares 25 and 625 respectively. Hence, they are automorphic numbers.

Write a program to accept a number. Pass it to a method that returns the same number of digits from its
square as many digits are available in the argument. Finally, display a message whether the number is an
automorphic number or not.

6.. Define a class named FruitJuice with the following description:

Data Members Purpose

int product_code stores the product code number

String flavour stores the flavour of the juice (e.g., orange, apple, etc.)

String pack_type stores the type of packaging (e.g., tera-pack, PET bottle, etc.)

int pack_size stores package size (e.g., 200 mL, 400 mL, etc.)

int product_price stores the price of the product

Member Methods Purpose

FruitJuice() constructor to initialize integer data members to 0 and string data members to ""

void input() to input and store the product code, flavour, pack type, pack size and product price

void discount() to reduce the product price by 10

void display() to display the product code, flavour, pack type, pack size and product price

3
7. Write a class with the name Area using function overloading that computes the area of a parallelogram, a
rhombus and a trapezium.

Formula:

Area of a parallelogram (pg) = base * ht

Area of a rhombus (rh) = (1/2) * d1 * d2


(where, d1 and d2 are the diagonals)

Area of a trapezium (tr) = (1/2) * ( a + b) * h


(where a and b are the parallel sides, h is the perpendicular distance between the parallel sides)

8. Design a class to overload a function compare( ) as follows:

1. void compare(int, int) — to compare two integers values and print the greater of the two integers.
2. void compare(char, char) — to compare the numeric value of two characters and print with the higher
numeric value.
3. void compare(String, String) — to compare the length of the two strings and print the longer of the
two.

9. Define a class bill that calculates the telephone bill of a consumer with the following description:

Instance variables/data members:


int bno: bill number
String name : name of the customer
int call :no: of calls consumed in a month.
double amt: bill amount to be paid by the person.
Methods/ Member functions
Bill() : constructor to initialize data members with default initial value.
Bill (…) :parameterized Constructor to accept billno, name and no of calls consumed.
calculate():to calculate the monthly telephone bill for a customer as per the following condition
Units Consumed Rate
First 100 calls Rs. 0.60/call
Next 100 calls Rs. 0.80/call
Next 100 calls Rs. 1.20/call
Above 300 calls Rs. 1.50/call
Fixed monthly rental applicable to all consumers : Rs.125/-
Display() : To display the details
Create an object in the main() method and invoke the above functions to perform the desired task..
10. Write a menu driven program to display
(i) first five upper case letters
(ii) last five lower case letters as per the user's choice.
Enter '1' to display upper case letters and enter '2' to display lower case letters.

4
11. Write a program in java to display the following patterns
TYPE 1 TYPE 2
PRTV a a a a a
PRT b b b b b
PR A A A A A
P B B B B B
12. Write a program to perform linear search on a list of integers given below, to search for an element input by
the user, if it is found display the element along with its position, otherwise display the message “Search
element not found”.
5, 7, 9, 11, 15, 20, 30, 45, 89, 97
13. Write a program to accept the year of graduation from school as an integer value from the user. Using the
binary search technique on the sorted array of integers given below, output the message "Record exists" if the
value input is located in the array. If not, output the message "Record does not exist".
Sample Input:

n[0] n[1] n[2] n[3] n[4] n[5] n[6] n[7] n[8] n[9]

1982 1987 1993 1996 1999 2003 2006 2007 2009 2010

14. Write a program to input 10 integer elements in an array and sort them in descending order using bubble
sort technique.
15. Write a program to accept 10 different numbers in a Single Dimensional Array (SDA). Arrange the numbers
in ascending order by using ‘Selection Sort’ technique and display them.

16. Write a program in Java to store the numbers in a 4*4 matrix in a Double Dimensional Array. Find the
highest and the lowest numbers of the matrix by using an input statement.
Sample Input:
12 21 13 14
24 41 51 33
61 11 30 29
59 82 41 76
Sample Output :
The lowest number in the array is 11
The greatest number in the array is 82
17. Special words are those words which start and end with the same letter.
Example: EXISTENCE, COMIC, WINDOW
Palindrome words are those words which read the same from left to right and vice-versa.

5
Example: MALYALAM, MADAM, LEVEL, ROTATOR, CIVIC
All palindromes are special words but all special words are not palindromes.

Write a program to accept a word. Check and display whether the word is a palindrome or only a special
word or none of them.

18. Write a program to accept a sentence. Display the sentence in reversing order of its word.
Sample Input: Computer is Fun
Sample Output: Fun is Computer
19. Write a program in Java to accept a word/a String and display the new string after removing all the
vowels present in it.
Sample Input: COMPUTER APPLICATIONS
Sample Output: CMPTR PPLCTNS
20. Write a program in Java to accept a sentence in lowercase. Convert first letter of each word of the sentence
in uppercase. Display the new sentence so formed.
Sample Input: we are in cyber world
Sample Output: We Are In Cyber World

You might also like