0% found this document useful (0 votes)
77 views5 pages

Class X Record Book Questions

Yesssirrrrrrtjjdjdndnd

Uploaded by

banani.global
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)
77 views5 pages

Class X Record Book Questions

Yesssirrrrrrtjjdjdndnd

Uploaded by

banani.global
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

St.

Francis School (ICSE)


Koramangala, Bengaluru-34
CLASS X – COMPUTER APPLICATIONS

PROGRAMS TO BE DONE IN BLUEJ AND TO BE WRITTEN IN COMPUTER RECORD BOOK.

DATE : 18-10-2024
1. Write a menu driven program to generate the uppercase letters from Z to A and lowercase
letters from ‘a’ to ‘z’ as per the user’s choice. Enter 1 to display uppercase letters from Z to A
and Enter ‘2’ to display lowercase letters from ‘a’ to ‘z’.

2. Write a program in Java to display the pattern –


A*B*C*D*E*
A*B*C*D*
A*B*C*
A*B*
A*

3. To input a number and to calculate & display the factorial of each Digit.
Sample Input : 365
Output :
Factorial of 5 : 120
Factorial of 6 : 720
Factorial of 3 : 6

4. Write a menu driven program to


a) Input 5 binary numbers and convert each into decimal. Display it.
b) Input 5 decimal numbers and convert each into binary. Display it.

5. Write a menu driven program to display the pattern of a string entered by the user. If the user
enters a choice ‘F’ then it displays the first character of each word. In case the choice is ‘L’, then
it will display the last character of each word.
Sample Input : GOD IS REALLY GREAT
Enter your choice : L
Enter your choice : F
SAMPLE Output: G Sample Output: D
I
S
R
G Y

6. Write a program to generate a triangle or an inverted triangle based upon User’s choice.
If choice is 1, then display the following triangle -
B
L L
UUU
E E E E
J J J J J
If choice is 2, then display the following triangle
BLUEJ
BLUE
BLU
BL
B
7. 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.
Example: MALAYALAM, MADAM, LEVEL
All palindromes are special words but all special words are not palindromes.
WAP to accept a word. Check and display whether the word is a palindrome or only a special
word or none of them.
8. Write a program to input a sentence. Create a new sentence by replacing each consonant with
the previous letter. If the previous letter is a vowel, then replace it with the next letter ( i.e, if the
letter is B, then replace it with C as the previous letter of B is A). Other characters must remain
same. Display the new sentence.
Sample Input: THE CAPITAL OF INDIA IS NEW DELHI

Sample output : SGE BAQISAK OG IMCIA IR MEV CEKGI

9. Write a menu driven program to accept an array of 10 numbers and


(i) Print the sum of all even numbers in the array.
(ii) Print those numbers which are divisible by 3.

(iii) Print all the buzz numbers.


10. WAP to input the names of 10 students in a single dimensional array. Now, enter a student
name and using linear search, search it in the given list of names. If name present, display “Search
Successful” else display “Search unsuccessful”.
11. Write a program to accept 10 different numbers in a Single Dimensional Array (SDA), in
ascending order. Now, enter a number and by using binary search technique, check whether
number is present or not in the list of array elements. If the number is present, then display the
message “Search Successful”, otherwise display “Search Unsuccessful” with their position in the
array.
a[0] a[1] a[2] a[3] a[4] a[5] a[6] a[7] a[8] a[9]
10 26 39 42 59 64 73 81 99 110
Sample Output:
Enter a number to be searched: 81
Search successful and the number is present in position 8.
12. Write a program to accept 10 different integers in a Single Dimensional Array (SDA). Arrange
the numbers in ascending order by using “Selection Sort” technique and display them.
13. Write a program in Java to store 10 words in a Single Dimensional Array (SDA). Display only
those words which are palindrome.

Sample Input: MADAM, TEACHER, REFER, SUNLIGHT, NOON, DAD, PLANT, MOM, MAGIC, CHALK.

Sample Output: MADAM


REFER
NOON
DAD
MOM

14. Write a menu driven program to perform the following:

To display the first n terms of the following series:


1, 3, 5, 7, 9 …………
To find the sum of the following series :

S = (a+1) + (a+2) +…….. (a+n)


Use two functions – one for display series and other for sum of series. Invoke these functions
from the main method.
15. Design a class to overload a function area () as follows:
double area(double a, double b, double c) with three double arguments, returns the area of
scalene triangle using the formula:
(𝑎+𝑏+𝑐)
area = √𝑠 (𝑠 − 𝑎) (𝑠 − 𝑏)(𝑠 − 𝑐) where s = 2

double area(int a, int b, int height) with three integer arguments, returns the area of a
trapezium using the formula :
1
area = 2 ∗ ℎ𝑒𝑖𝑔ℎ𝑡 ∗ (𝑎 + 𝑏)

double area(double diagonal1, double diagonal2) with two double arguments, returns the area
of a rhombus using the formula :
1
area = = 2 ∗ 𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙1 ∗ 𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙2

Need not write the main() method.


16. A tech number has even no: of digits. If the no: is split into equal halves, then the square of the
sum of these halves is equal to the number itself. WAP to generate and print all 4- digit tech
numbers using a user defined function [ void checkForTech() ]. This function should be invoked
from main method.
Examples of tech numbers : 2025, 3025, 9801
17. Write a program to input a sentence and create a new sentence after encoding the sentence in
the following format. If the character is a vowel, then replace it with the next character else the
character is the same.
Input : INDIA IS MY COUNTRY

Output : JNDJB JS MY CPVNTRY


18. Write a program to accept 10 names in a Single Dimensional Array (SDA). Display the names
whose first letter matches with the letter entered by the user.
Sample Input:
Aman Sahi
Akash Gupta
Suman Mishra
Anaya Gopal
----------
---------- etc
Sample Output:
Enter a letter : A
Aman Sahi
Akash Gupta
Anaya Gopal
19. Design a class RailwayTicket with following description :
Instance variables/ Data members:
String name : To store the name of the customer.
String coach : To store the type of coach the customer wants to travel.
long mobNo : To store customer’s mobile number.
int amt : To store the basic amount of ticket.
int totamt : To store the amount to be paid after updating the original amount.
Member Methods:
void accept() : To take input for name, coach, mobile number and amount .
void update() : To update the amount as per the coach selected (extra amount to be added in
the amount as follows)

Types of Coaches Amount


First_AC 700/-
Second_AC 500/-
Third_AC 250/-
Sleeper None

void display() : To display all details of a customer such as name, coach, total amount and
mobile number.
Write a main method to create an object of the class and call the above member methods.

20. Define a class with the following description:

Class name : BookFair


Instance variables/Data members
String bname : stores the name of the book.
double price : stores the price of the book.
Member Methods
void input() : to input and store the name and price of the book.
void calculate() : to calculate the price after discount.
Discount is based on the following criteria:
Price Discount

Less than or equal to Rs. 1000 2% of price

More than Rs. 1000 and less than or equal to Rs. 3000 10% of price

More than Rs. 3000 15% of price

void display() : To display the name and price of the book after discount.
Note :
✓ Questions 1 to 13 are already completed by 31st July 2024.
✓ Questions 14 to 20 to be completed by 18 th November 2024.
✓ Please check each page of your record book and do the corrections as mentioned by the
teacher (for the first 13 programs). SUBMIT THE RECORD BOOK WITH THE CORRECTIONS
on 18thNovember 2024.
✓ The variable names, data types and description of the variables to be written in table
format. [ Tables to be drawn in pencil only ]
✓ Write the input given and the output obtained (under heading OUPUT) when you executed
the program which depicts your program is working.
✓ Write the program neatly in your computer record book and make sure your work is neat
and without any errors.
✓ LATE SUBMISSION OF RECORD IS NOT ENTERTAINED.

You might also like