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

Class X Record Book Questions-1

Uploaded by

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

Class X Record Book Questions-1

Uploaded by

Khushi Sreedhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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 'f.
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 stringentered by the user. If the
user
enters a choice 'V then it displays the first character of each word. In case the choice is 'L'I
then
it will display the last character of each word.
Sample Input : GOD 15 REALLY GREAT
Enter your choice : F inter your choice : L
SAMPLE Output: G Sample Output: D
I
S
R
G
Y
T
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
LL
UUU
EEEE
JJJJJ
0:, Scanned with OKEN Scanner
If choice is 2, then display the following triangle
BLUE.I
BLUE
BLS
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 BACLISAK 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 I
(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".
na 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.
Sample Output:
Enter a number to be searched: 81
Search successful and the number is present in position 8.
Scanned with OKEN Scanner
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, ............
To find the sum of the following series
S (a+3.) + (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 0 as follows:
double area(double a, double b, double c) with three double arguments, returns the area of
scalene triangle using the formula:
area Nis (s (s b)(s c) where s = (a-l-b+c)
2
double area(int a, int b, int height) with three integer arguments, returns the area of a
trapezium using the formula :
area -2 * height * (a b)
double area(double diagonall, double diagonal} with two double argu merits, returns the
area
of a rhombus using the formula :
area 2
- * diagonall * diagona12
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 usinga 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 encod
ing the sentence in
the follow' ng format. Jf-the character is a vowel, then replace it with the next character
else the
character is the same.
Scanned with OKEN Scanner
Input : INDIA IS MY COUNTRY
Output : JNDJB J5 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:
Arran Sabi
Akash Gupta
Suman Mishra
Anaya Gopal
------ etc
Sample Output:
Enter a letter :
Amara Sahi
Akash Gupta
Anaya Gopal
19. Design a class RailwayTicket with following description
Instance variables/ Data members:
String name
String coach
long mobNo
int amt
int totamt
To store the name of the customer.
: To store the type of coach the customer wants to travel.
: To store customer's mobile number.
: To store the basic amount of ticket.
: 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)
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 brume -
. 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.
Scanned with OKEN Scanner
Discount is based on the following criteria:
void display() : To display the name and price of the book after discount.
Note
 Questions I to 13 are already completed by 31st July 2024.
1 Questions 14 to 20 to be completed by le 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 lehNovember 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 OU PUT)
when you executed
the program which depicts your program is working.
V Write the program neatly in vourcomputer record book and make sure your work is
neat
and without any errors.
 LATE SUBMISSION OF RECORD IS NOT ENTERTAINED.
0:, Scanned with OKEN Scanner

You might also like