Computer Application Class 9 2024 Question Paper
Computer Application Class 9 2024 Question Paper
Attempt all question from Section Aand any four from Section B.
The intended marks or questions or parts of questions are given in
brackets( |
SECTION A (40 marks)
(Attempt all questions)
Question 1 20
Choose the correct answers to the questions from the given options.
(Do not copy the question. Write the correct answer only.)
1. The components used to perform a task in the base class may be used for
another task in the derived class. This feature is called
a. Data Abstraction
c. Reversibility
b. Encapsulation d. Reusability
2. Using a function multiple times is
a. Inheritance
c Polymorphism
b. Encapsulation d. Data abstraction
3. Which of the following is a valid
comment?
a
/'commentt// c. /*comment/
b. //comment d. */comment
4. Compiler and interpreter are also
known as
a. Converter
C. Byte code
b. Language processor d. Assembler
5. Which is the correct statement to create an object Siriof class art int
a. art_int Siri = new art int):
b. Art_int Siri=new (system.in);
C. Art_int siri = new art_int():
d. art int Siri new art_int
6. Name the primitive data type in Java that is a single 16-bit Unicode
character whose default value is '\u0000'
a. String
b. Character c. char
7. The ASCIl codes of upper d. long
case alphabcts range from:
a. 65-90
b. 60-85 C. 55-91
d. 97-122
2
condition ic. true or false. Which of
8. Boolean Data is used to test a particular
the following is acorrect representation? C. boolean m"true
a. boolean mtrue
b. boolean m='true' d. Boolean mtrue
15. A kind of error that does not produce the desired output
a. Syntax error c. Run time error
b. Logical error d. None of the above
16. A process where all desired verification against specifications have been
performed
a. Debugging c. Looping
b. Testing d. Iteration
17. What will the following function return when executed?
int p=Math.abs(Math.max(-91,-97);
b. 97
d. 91
C. -97
e. -91
18. Privacy of data can be breached by
a. Personal details
disclosing information pertaining to:
b. Healthcare records
C. Criminal justice investigations
d. All of these
19 The tght to decide how much personad information you wint to
COiniunicate with others is know S
a. Copyright C. Privacy
b. Trademark d. Information Security
20. Java applications can run on ..
a. Windows platform c. UNINX platforn
b. Macintosh platform d. All of these
Question 2
1. Convert to for loop (2)
int sum= 0, i= (0,
do
Sum = sum i,
itt:
while(i <= 100);
6. Analyze the given program segment and answer the following questions: (3)
for(int i3;i<«4;it+)
for(int j-2j<ij++)
System.out.print(" :
System.out println("WIN ):
7. State the ditference between entry controlled loop and exit controlled loop
(5)
8. Correct he errors in the gven progratns
class public
public static void main(String args)
int a=45,b=70,c=65.45;
sum-atb;
diff-c-b;
System.out.println(sum,dif):
SECTION B
Answer any four questions from this section
Question 1 (15)
Using the switch statement, write a menu driven program to calculate the
maturity amount of a Bank Deposit.
The user is given the following options:
1. Term Deposit
2. Recurring Deposit
For option 1, accept principal (P), rate of interest(r) and time period in years(n).
Calculate and output the maturity amount(A) receivable using the formula:
A P{1 + r| 100]n
For option 2, accept Monthly Installment (P), rate of interest (r) and time period in
months (n). Calculate and output the maturity amount (A) receivable using the
formula:
Total Cost
Discount Gift
Up to 2,000 5% Calculator
Write a progran to input the total cost. Compute and display the amount to be
paid by the customer along with the gift.
Question 4
(15)
Mr. Kumar is an LIC agent. He offers discount to his policy holders on the annual
premium.
tariff.
However, he also gets commission on the sum assured as per the given
Up to 1,00,000 5% 2%
Write a program to input name of the policy holder, the sum assured and first
annual premium. Calculate the discount of the policy holder and the commission
of the agent. The prograrn displays all the details as:
Name of the policy holder:
Sum assured:
Premium
1Dscount on the first premium :
Commission of the aent
-6
* 2) + (1 + 2 + 3)
/ (1 *n)
S= (1 +2)*3*-- pattern (7)
)/(1 *2 the following
program to generate
2. Write a
54 321
5432
543
54
5
(15)
Question 6
and check whether it is a 'Spy Number' or
number
Writea program to accept a sum of its digits equals the product of its digits.)
not. (A number is spy if the
Example:Sample Input: 1124+4=8
l +2
Sum of the digits = 1+1*1*2*4
Product of the digits = 8
-XXX