VIBGYOR HIGH
First Term Examination
AY 2025-2026
COMPUTER APPLICATIONS
SAMPLE PAPER
Grade: IX Max. Marks : 100
Date : Time Allowed : 2 hours
_____________________________________________________________________
INSTRUCTIONS:
• Answers to this paper must be written on the paper provided separately.
• You will not be allowed to write during the first 15 minutes.
• This time is to be spent in reading the question paper.
• The time given at the head of this paper is the time allowed for writing the
answers.
• The intended marks for the questions or parts of questions are given
alongside the questions.
• This paper is divided into 2 sections.
• Answer all questions from Section A, and any four questions from Section B.
• This paper contains 10 printed sheets.
_____________________________________________________________________
Section A (40 Marks)
(Attempt all the questions from this section.)
Question 1 Choose the correct answers to the questions from the given [20]
options. (Do not copy the question, write the correct answers
only.
i. [1]
____
1
Name the principle of OOPS depicted in the above picture.
(a) Polymorphism
(b) Inheritance
(c) Abstraction
(d) Encapsulation
ii. Predict the output of the following: [1]
int a=4,b=2;
a += b++ * 5 / a++ + ++b + a;
[Link](a+" "+b);
(a) 15 6
(b) 11 2
(c) 12 3
(d) 15 4
iii. Java compiler is a software that converts the source code into an [1]
intermediate code called as ___________.
(a) Interpreter
(b) Byte code
(c) Object code
(d) Source Code
iv. Identify the keyword from the following: [1]
(a) String
(b) System
(c) new
(d) Scanner
v. Predict the output of the following code. [1]
[Link](“Welcome to ”);
[Link](“the world of “);
[Link](“Java”);
(a) Welcome to
the world of
Java
(b) Welcome to the world of Java
2
(c) Welcome to the world of
Java
(d) Welcome to
the world of Java
vi. When you open your mailbox and find that a number of unwanted [1]
mails have come into your inbox these mails are called as _______.
(a) Software piracy
(b) Hacking
(c) Malicious code
(d) Spam
vii. Identify the escape sequence character which is used to take the [1]
cursor to the new line.
(a) \t
(b) /n
(c) /t
(d) \n
viii. Identify the correct java expression for the following mathematical [1]
expression:
0.5
𝑎2 + 𝑏 +𝑐 5
x= 2𝑎𝑏
(a) x=(a*a + 0.5/b + [Link](c,5))/(2*a*b);
(b) x=(a*a + 0.5/b + [Link](c,5))/2*a*b;
(c) x=a*a + 0.5/b + [Link](c,5)/(2*a*b);
(d) x=(a*a + 0.5/b + [Link](c,5))/(2ab);
ix. Arrange the operators given below from higher precedence to lower [1]
precedence.
% = && ++ >=
(a) % + && >= =
(b) ++ % >= && =
(c) >= % ++ = &&
(d) && ++ >= % =
3
x. _______ can be defined as an online crime, using computer and [1]
internet.
(a) Malicious code
(b) Cyber law
(c) Cyber crime
(d) Data protection
xi. What will be the value of c after executing the following statement: [1]
int c = (3<4) ? 3*4 : 3+4;
(a) c=5
(b) c=12
(c) c=0
(d) Syntax error
xii. Which of the following represents a single line comment: [1]
(a) //
(b) /* */
(c) /** **/
(d) \\
xiii. [1]
The above shown images represents objects of which class?
(a) Vegetable
(b) Flower
(c) Fruit
(d) Nut
4
xiv. Study the below code and identify which java statement can be used [1]
instead of the below code.
if(num>10)
grade=’A’
else
grade=’B’
(a) grade=(num>10)?’A’:’B’;
(b) grade=(num>10)?A:B;
(c) (num>10)?grade=’A’:grade=’B’;
(d) (num>10)?grade=A:grade=B;
xv. Predict the output of the following: [1]
[Link]([Link](-8.9));
[Link]([Link](9.4));
[Link]([Link](-7.5));
(a) -9.0
9.0
-8
(b) -8.0
9.0
-7.0
(c) -9.0
9.0
-8.0
(d) -8.0
9.0
-7
xvi. How much memory space will be occupied by the variable num if it is [1]
declared as shown below?
long num;
(a) 32 bits
(b) 64 bits
(c) 8 bits
(d) 16 bits
5
xvii. Assertion(A): Class is called as an object factory. [1]
Reason(R): Many objects can be created from a class.
(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 false and Reason (R) is true.
(d) Assertion (A) is true and Reason (R) is false.
xviii. Identify the method used to return a random number between 0 and [1]
1.
(a) [Link](0,1)
(b) [Link]()
(c) random(0,1)
(d) random()
xix. Assertion (A): If there is no break statement after a case it will lead to [1]
a fall through situation.
Reason(R): If the break statement is not used after a case then the
control enters into another case for execution.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is
not a correct explanation of Assertion (A).
(b) Assertion (A) is false and Reason (R) is true.
(c) Assertion (A) is true and Reason (R) is false.
(d) Both Assertion (A) and Reason (R) are true and Reason (R) is
a correct explanation of Assertion (A)
xx. Identify the method of Scanner class used to read a word from the [1]
Scanner class object.
(a) next()
(b) nextWord()
(c) nextLine()
(d) next().charAt()
6
Question 2 [20]
i. Identify the data types of the following: [2]
(a) true
(b) ‘5’
ii. Write a Java statement for the following: [2]
(a) Create an object of the Scanner class to take input from the
user.
(b) To import Scanner class in your program.
iii. If the class name is Customer, then what will be the name of the [2]
following:
(a) Source code file
(b) Byte code file
iv. Write Java statement for the following: [2]
(a) Create an object swift of class Maruti.
(b) Declare a variable age of int data type.
v. Are java programs platform independent? Justify. [2]
vi. Name the two programming paradigms. [2]
vii. Differentiate between Class and Object. [2]
viii. Name any two types of Intellectual Property Rights. [2]
ix. Sam executes the following program segment, the output displayed is [2]
0.0 and not 6.0. How the program can be modified to get the output
as 6.0? Correct the below code and rewrite.
double b=2,h=6;
double a=1/2*b*h;
[Link](a);
x. Write a Java expression for the following using mathematical library [2]
methods:
𝑎 = 𝑥 6 + 2𝑥𝑦
7
Section B (60 Marks)
Attempt any four questions from this Section.
The answers in this section should consist of the Programs in BlueJ
environment or any program environment with Java as the base.
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 Write a program to accept code, name and basic salary of an [15]
employee from the user using parameterized method. Calculate hra,
da, pf and net salary as per the following criteria and display all the
details of the employee.
hra=10% of basic
da=55% of basic
pf=Rs.1000
netsal=basic+da+hra-pf;
(Use Parameterized method)
Sample Output:
Employee Code: 101
Employee Name: Rehan
Basic Salary: 10000.0
HRA: 1000.0
DA: 5500.0
PF: 1000.0
Net Salary: 15500.0
Question 4 You have a saving account in a bank with some balance amount in [15]
your account. Now, you want to perform the following tasks, as per
your choice. The tasks are as under.
1. Money Deposited
2. Money Withdrawn
3. Check balance
0. Exit
8
Write a menu driven program to take input from the user and perform
the above tasks. The program checks the balance before withdrawal
and finally displays the current balance after transaction. For an
incorrect choice, an appropriate message should be displayed. (Use
Scanner class)
Sample Input:
Enter 1 to Deposit money
Enter 2 to Withdraw money
Enter 3 to Check balance
Enter 0 to Exit
Enter your choice: 1
Enter amount to deposit: 100
Sample Output:
Money deposited.
Total balance = 5100.0
Question 5 ABC courier company charges for the courier based on the weight of [15]
the parcel. Write a program which will accept name of the customer,
weight of the parcel from the user. Calculate the bill amount to be
paid by the customer as per the following criteria.
Weight in kgs Rate per kg
First 5 kgs Rs. 800
Next 5 kgs Rs. 700
Above 10 kgs Rs. 500
After calculating the bill amount display all the details. (Use Scanner
class)
Sample Input:
Enter name of the customer
Mahesh
Enter weight of the parcel
8
Sample Output:
Name of the customer : Mahesh
Weight of the parcel : 8.0
Bill Amount : 6100.0
9
Question 6 Write a program to input three numbers (positive or negative). If the [15]
numbers entered are unequal then display the greatest number
otherwise, display “Entered numbers are equal” (Use nested if). The
program also displays whether the numbers entered by the user are
“All positive”, “All negative” or “Mixed numbers” (Use Scanner class).
Sample Input:
Enter first number: 10
Enter second number: -20
Enter third number: 50
Sample Output:
The greatest number is 50
Entered numbers are mixed numbers.
Question 7 Write a program to accept a two-digit number. If the number entered [15]
is not two-digit number, then display the message “Entered number is
not a 2-digit number" and terminate the program. Otherwise add the
sum of its digits to the product of its digits. If the value is equal to the
number input, display the message "Special 2 - digit number"
otherwise, display the message "Not a special two-digit number".
(Use Scanner class)
Sample Input:
Enter a 2 digit number: 59
Sample Output:
Special 2-digit number
Question 8 Write a program to input a number. Calculate its square root and cube [15]
root. Finally, display the result by rounding it off. (Use Mathematical
Library Methods and Scanner class)
Sample Input:
Enter the number: 16
Sample Output:
Square root of 16 = 4.0
Rounded form of square root = 4
Cube root of 16 = 2.5198420997897464
Rounded form of cube root = 3
*****
10