PRESIDENCY GROUP OF SCHOOLS
Bangalore / Mangalore
[ICSE SCHOOLS]
MIDTERM EXAMINATION -2025
COMPUTER APPLICATIONS
Date: 19.09.2025 Class: X
Time allowed: Two Hours Max. Marks: 100
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.
This Paper is divided into two sections.
Attempt all questions from Section A and Section B.
The intended marks for questions or part of questions are given
SECTION A
Question 1 [1x20=20]
Choose the correct answer to the questions from the given options.(Do not copy the
question, write the correct answers only.)
i. Name the OOPs concept depicted in the below picture.
a) Abstraction
b)Encapsulation
c) Class and objects
d)Inheritance
ii. Which file extension is used for Java source files?
a) .jav
b) .java
c) .class
d) .jv
iii. What is the result of [Link]([Link](625,0.5)?
a) 125.0
b) 5.0
Page 1 of 8
c) 2.5
d) 0.5
iv. What is the output of this code?
int i = 0;
while(i < 3)
{
[Link](i);
i++;
}
a) 012
b) 123
c) 01
d) 0123
v. What is the output of this code?
for(int i = 1; i <= 3; i++) {
if(i == 2)
continue;
[Link](i);
}
a) 123
b) 12
c) 13
d) 23
vi. How many times will the following code print Hello?
for(int i = 1; i <= 2; i++) {
for(int j = 1; j <= 3; j++) {
[Link]("Hello");
a) 2
b) 3
c) 5
d) 6
[Link] is the output of this code?
for(int i = 1; i <= 2; i++) {
for(int j = 1; j <= 2; j++) {
[Link](i + "" + j + " ");
}}
Page 2 of 8
a) 1 2 1 2
b) 1 1 2 2
c) 11 12 21 22
d) 12 21 22
viii. What is the purpose of the System class in Java?
a) To store data
b) To handle files
c) To provide system-related methods like input/output
d) To work with strings
ix. Which of the following is NOT a Java library class?
a) Math
b) Scanner
c) Player
d) String
x. Which method is used to compare two strings for equality?
a) ==
b) equals()
c) compare()
d) match()
xi. What does the substring(2, 5) method return from the string "Programming"?
a) "ogr"
b) "gra"
c) "ogr"
d) "ogr"
xii. Which of the following is the correct syntax to define a method in Java?
a) method void myMethod()
b) void myMethod()
c) define myMethod()
d) create method myMethod()
xiii. What does the void keyword mean in a method definition?
a) Method returns an integer
b) Method returns a string
c) Method does not return any value
d) Method takes no parameters
xiv. The process of creating an object from a class is called:
a) Instantiation
b) Declaration
Page 3 of 8
c) Initialization
d) Inheritance
xv. Assertion (A):An expression is a combination of operators and operands.
Reason (R ): It is a set of variables, constants and arithmetical operators.
Based on the above discussion, choose an appropriate statement from the options given
below.
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
xvi. Assertion(A): When a variable gets initialised at runtime, it is termed as “Dynamic
Initialisation”.
Reason ( R): In this situation, a variable is assigned with the outcome of any
arithmetical operation or function.
Based on the above discussion, choose an appropriate statement from the options given
below.
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
xvii. Choose the statement which is equivalent to the given:
if(a>b)
[Link]. println(“Honest”);
else
[Link](“Sincere”);
a) a>b? [Link]. println(“Honest”):[Link](“Sincere”);
b) [Link](a>b? “Honest”: “Sincere”);
c) a>b? “Honest”: “Sincere”;
d) a>b: “Honest”? “Sincere”;
xviii. The two Java statement are used to check for the equality of the strings
“COP” and “cop” are as follows:
“COP”. equals(“cop”) “COP”. equalsIgnoreCase(“cop”)
The output of the above statements is:
a) false, true
b) true, false
c) false, false
d) true, true
Page 4 of 8
xix. What is the result of this expression: true || false && false?
a) true
b) false
c) error
d) null
xx. What is the result of this expression:
a+= a++ - ++a – a-- /2 + a when a=5
a) 6
b) 7
c) 8
d) 9
Question 2:
(i) State the java concept that is implemented through [2]
a. A superclass and a subclass.
b. The system of wrapping data and function into a single unit.
(ii) State the output for: [2]
a) [Link](“Hello World”.lastIndexOf(“Hello”.charAt(2)));
b) [Link](“Wrestling World”.substring(9));
(iii) Read the following code segments and answer the questions that follow: [2]
class Abc
{
static int j,i;
Abc()
{
[Link](ABC object is now created”);
}
Abc(int a)
{
i=a;
j*=I;
}}
(a) What are the values of I and j before the object is created?
(b) Write the statements to create objects that invokes constructor 1,2
(iv) Define ‘Coercion’ with reference to type conversion. [2]
(v) Predict the output. [2]
int num = 5;
switch(num) {
case 1:
[Link]("One");
break;
default:
[Link]("Default");
Page 5 of 8
case 5:
[Link]("Five");
break;
}
(vi) Rewrite the following program segment using if…else statement. [2]
comm=(sale>15000) ? sale*5/100:0;
(vii) Give one point of difference between the Unary and the binary operators. [2]
(viii) State one difference and one similarity between while and do-while loop. [2]
(ix) Differentiate between break and continue. [2]
(x) State the difference between = and == [2]
SECTION B
(Answer any four questions from this Section)
The answers in this section should consist of the programs in either BlueJ environment or
any program environment with java as the base.
Each program should be written using variable description/mnemonic codes so that the logic
of the program is clearly depicted.
Flowcharts and algorithms are not required.
Buffered Reader/ Data Input Stream should not be used in the program.
Question 3 [15]
Define a class with following specifications.
class name: Hotel
Member variables:
String name: stores name of customer
long mobno: stores mobile number
int days: stores number of days customer stayed in hotel
int bill: stores customer bill
Member method:
void input() – input values using Scanner class methods only
void charge()- calculate bill as per the following criteria
days charge/day
first 3 days ₹1000 /day
next 4 days ₹900/day
>7 days ₹ 800/day
bill=bill +gst(18% of bill)
void print()- display customer name, mobile number and bill.
Invoke all the above methods in main method with the help of an object.
Page 6 of 8
Question 4 15]
Design a class name ShowRoom with the following description:
Instance variables / Data members:
String name — To store the name of the customer
long mobno — To store the mobile number of the customer
double cost — To store the cost of the items purchased
double dis — To store the discount amount
double amount — To store the amount to be paid after discount
Member methods:
ShowRoom() — default constructor to initialize data members
void input() — To input customer name, mobile number, cost
void calculate() — To calculate discount on the cost of purchased items, based on following
criteria
Cost Discount (in percentage)
Less than or equal to ₹10000 5%
More than ₹10000 and less than or equal to
10%
₹20000
More than ₹20000 and less than or equal to
15%
₹35000
More than ₹35000 20%
void display() — To display customer name, mobile number, amount to be paid after
discount.
Write a main method to create an object of the class and call the above member methods.
Question 5 [15]
Define a class to overload the method transform as follows:
int transform(int n)- to return the sum of the digits of the given number
Example n=458 output:17
void transform(String s)- to convert the given String to uppercase and print
Example: if S=”Blue” output:BLUE
void transform(char ch)- to print the character ch in 3 rows and 3 columns using
nested loops.
Example: if ch =’@’ output : @@@
@@@
Page 7 of 8
@@@
Question 6 [15]
Define a class to accept a number and check if the sum of the first digit and the last digit is an
even number or an odd number
Example: N=2396 N=9316
First digit 2 9
Last digit 6 6
Sum 8 15
Output Sum is even Sum is odd
Question 7 [15]
A class Palprime has been defined to display Palprime words from a sentence. Palprime is a
palindrome word and its length is a prime number.
Example:
Input: MY MOM POSSESSES A GOOD LEVEL OF KNOWLEDGE IN
MALAYALAM
Output: MOM, LEVEL
Write a java program to accept a string and check whether it is a Palprime word.
Question 8:
[15]
Write a menu driven program to display the pattern as per user’s choice
Pattern Pattern2
ABCDE B
ABCD LL
ABC UUU
AB EEEE
A JJJJJ
For an incorrect option, an appropriate error message should be displayed.
Page 8 of 8