Grade 9 Computer Application Final Exam Question Paper 2023-24
Grade 9 Computer Application Final Exam Question Paper 2023-24
Bangalore / Mangalore
[ICSE SCHOOLS]
FINAL EXAMINATION – MARCH 2024
COMPUTER APPLICATIONS
Section A
[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.)
a) Inheritance
b) Abstraction
c) Encapsulation
d) Polymorphism
Page 1 of 8
ii) Which of these are selection statements in Java?
a) if
b) for()
c) continue
d) break
vi) Assertion (A): There are no restrictions on the number of return statements that may be present
in a function.
Reason (R): The execution of a function terminates once a return statement is encountered,
regardless of the number of return statements present.
a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A).
b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct
explanation of Assertion (A).
c) Assertion (A) is true and Reason (R) is false.
d) Assertion (A) is false and Reason (R) is true.
Page 2 of 8
vii) What will be the output of the following code ?
class increment
{
void main()
{
int g = 3;
System.out.print(++g * 8);
}
}
a) 32
b) 33
c) 24
d) 25
viii) With x = 0, which of the following are legal lines of Java code for changing the value of x
to 1?
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;
a)1, 2 & 3
b) 1 & 4
c) 1, 2, 3 & 4
d) 3 & 2
Page 3 of 8
xi) Go through the following text, and choose the correct answer:
A reverse loop or backward loop is a loop where the value of the loop control variable (assume x) gets
decremented in every iteration. The lowest value of the loop control variable is mentioned in the loop
condition of backward loops.
If we want to print all natural numbers from 10 to 1, then the test expression will be:
a) x>=10
b) x<=10
c) x>=1
d) x==1
xii) Assertion (A): Fall through may occur in any branching statement.
Reason (R): The absence of a break statement executes the next case block.
a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion
(A)
b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation
ofAssertion (A)
c) Assertion (A) is false and Reason (R) is true
d) Assertion (A) is true and Reason (R) is false
xiii) Predict the output of the following statement:
System.out.print(Math.round(24.5)+ Math.floor(-24.5));
a) 1
b) 1.0
c) 0
d) 0.0
xiv) Math.pow(81,1/2)+Math.sqrt(81) is
a) 18.0
b) 10.0
c) 9.0
d) 10
xv) Which of the following are non-executable statements that are ignored by the compiler or
interpreter?
a) Blocks
b) Comments
c) Statements
d) None of these.
xvi) Which Java package includes the Math class?
a) java.io
b) java.lang
c) java.util
d) java.sys
Page 4 of 8
xvii) ________ is an unusual execution of more than one case at a time.
a) Continue
b) Infinite
c) Null
d) Fall through
xviii) A loop in programming is also termed as:
a) Iterative construct
b) Conditional construct
c) Sequential construct
d) Both a and b
xix) Predict the output of the following code snippet:
int i, n=3;
for (i=1; i<=3; i++)
{
while (n<=i)
{
System.out.println(n);
n--;
}
}}}
a) Both values are equal
b) Infinite loop
c) Values are not equal
d) No output
a) 251694
b) 2516941
c) 1
d) No output
Question 2:
Page 5 of 8
iv. Write a method prototype swap that receives two numbers and returns
nothing to the caller method. [2]
v. When int y = 10, find z = (++y *y++ /5)) [2]
vi. What is a package? Give example.
vii. Write java expression for [2]
viii. With the help of an example write the purpose of default in switch case [2]
ix. What is a compound statement? Give an example. [2]
x. What will be the output? How many times will the following loop
execute? [2]
int p=7,q=20;
while(p++<=--q)
{
System.out.print(2*q-3*p);
++p;
q--;
}
SECTION B (60 Marks)
Attempt any four questions from this Section.
The answer in the Section should consist of the Program in BlueJ environment with Java. Each program
should be written using Variable descriptions/Mnemonic Codes such that the logic of the program is
clearly depicted.
Flow charts and Algorithms are not required
Question 3: [15]
Write a menu-driven program using switch-case to perform the following tasks as per a choice entered by
the user:
Question 4: [15]
Write a program to print the first 15 terms of the Pell series.
In Mathematics, the Pell numbers are an infinite sequence of integers. The sequence of Pell numbers starts
with 0 and 1, and then each Pell number is the sum of twice the previous Pell number and the number before
that.
The first few terms of the sequences are: 0, 1, 2, 5, 12, 29, 70, …….
70 = 2 x 29 + 12; Hence, 70 is a Pell number.
Page 6 of 8
Question 5 : [15]
Design a class to overload a function series( ) as follows:
(a) series(int a, int n) — To display the sum of the series given below:
a + (a2/2) + (a3/3) +(a4/4) + …… n terms
(b) 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.
Question 6:
[15]
A courier service company namely ‘Joel Courier Service’ charges on the weight of the parcel to be shipped
as per the following criteria:
Write a program to accept the Name of the customer and the weight of the parcel to be delivered, calculate
the amount to be paid, and display the bill in the following format:
Question 7 : [15]
1
27
3 8 12
4 9 13 16
5 10 14 17 19
6 11 15 18 20 21
Page 7 of 8
Question 8: [15]
An electronics shop has announced the following seasonal discounts on the purchase of certain items
Purchase Amount in ₹ Discount on Laptop Discount on desktop
0–25000 0.0% 5.0%
25001 – 57000 5.0% 7.5%
57001 – 100000 7.5% 10.0%
More than 100000 10.0% 15.0%
Write a program based on the above criteria, to input name, address, amount of purchase and the type of
purchase (L for Laptop and D for Desktop) by a customer. Compute and print the net amount to be paid
by a customer along with his name and address.
******************
Page 8 of 8