0% found this document useful (0 votes)
26 views

icjecapu09

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

icjecapu09

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ICSC Class 10 Computer Applications Sample Paper 09 Page 1

Sample Paper 09
ICSE Class X 2024-25
COMPUTER APPLICATIONS
Time: 2 Hours Max. Marks: 100
General Instructions :
1. Answers to this Paper must be written on the paper provided separately.
2. You will not be allowed to write during the first 15 minutes.
3. This time is to be spent in reading the question paper.
4. The time given at the head of this Paper is the time allowed for writing the answers.
5. This Paper is divided into two Sections.
6. Attempt all questions from Section A and any four questions from Section B.
7. The intended marks for questions or parts of questions are given in brackets [ ].

SECTION A
Attempt all questions from this part.

QUESTION 1.
Choose the correct answer and write the correct option.
(Do not copy the question, write the correct answers only.)

(i) Which of the following could cause the Java compiler to report a syntax error in a specific line of a program?
(a) The program is typed in the wrong font.
(b) The line contains a comma(,) instead of a dot($).
(c) It is caused by Java runtime.
(d) Program takes too long to complete.

(ii) Consider the following code snippet :


float x = 12.75F;
int y;
y = (int) x + 5;
What are the values of x and y?
(a) x= 12.75, y = 17 (b) x = 16, y = 12.75
(c) x = 17, y = 12.75 (d) x =17, y = 17

(iii) If the condition ((a > b) && (a > c)) is true, which of the following statements is correct?
(a) a is the largest number. (b) b is the largest number.
(c) c is the largest number. (d) b is the smallest number.

(iv) What are the parameters in a method definition called?


(a) Actual parameters (b) Formal parameters
(c) Informal parameters (d) Void parameters

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 2 Sample Paper 09 NODIA

(v) JVM converts byte code directly into


(a) Machine code (b) Another byte code
(c) High level code (d) None of these

(vi) Which operator cannot be used with if-else statement?


(a) < = (b) | |
(c) && (d) ? :

(vii) What is the default data type of a floating-point literal in Java?


(a) Double (b) Float
(c) Int (d) Long

(viii) In Java, a String is:


(a) Interface (b) Mutable
(c) Method (d) Immutable

(ix) Which of the following statements is correct?


(a) Binary search is less efficient than sequential search.
(b) Binary search is less efficient than linear search.
(c) Binary search is more efficient than sequential search.
(d) Binary search is equally efficient as sequential search.

(x) Give the output of Math.ceil (– 0.9)


(a) – 1.6 (b) – 1.5
(c) – 1.0 (d) – 0.0

(xi) Which element is num[10] of array num?


(a) 8th (b) 9th
(c) 10th (d) 11th

(xii) Which class is used to convert a primitive data type to its corresponding object?
(a) String (b) Wrapper
(c) System (d) Math

(xiii) Assume x =2 with the following code snippet :


int y = – – x;
Which one of the following is true?
(a) x =1, y = 1 (b) x = 0; y = 0
(c) x =1; y = 0 (d) x = 0; y =1

(xiv) What data type is returned by the equals() method of the String class?
(a) Char (b) Int
(c) Boolean (d) All of these

(xv) What is a class in programming ?


(a) An object factory (b) A blueprint to create objects
(c) A specification for objects (d) All of the above

Install NODIA App to See the Solutions.


Click Here To Install
ICSC Class 10 Computer Applications Sample Paper 09 Page 3

(xvi) What value does the compare To() function return if the invoking string is less than the string it is compared
to?
(a) Zero (b) Value less than zero
(c) Value greater than zero (d) None of the above

(xvii) Assertion (A) : JVM is a Java interpreter loaded in the computer memory as soon as Java is loaded.
Reason (R) : JVM is different for different platforms.
(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.

(xviii) Read the following text and choose the correct answer:
Java constructor overloading allows a class to have multiple constructors with different parameter lists. The
compiler distinguishes these constructors based on the number and types of parameters provided.
Why do we use constructor overloading?
(a) To use different types of constructors.
(b) Because it’s a feature provided.
(c) To initialize the object in different ways.
(d) To differentiate one constructor from another.

(xix) Assertion (A) : Class initialization is the explicit initialization of class fields to values.
Reason (R) : Each class field explicitly initializes to a value via a class field initializer.
(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.

(xx) Which access specifier allows access only by subclasses in other packages or any class within the same
package?
(a) Protected (b) Private
(c) Public (d) Default

QUESTION 2.

(i) State the number of bytes and bits occupied by an int array of 20 elements.

(ii) Convert the following segment into an equivalent do-while loop.


int a, b;
for(a=5, b=15; b>=5; b=b-3)
a++;

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 4 Sample Paper 09 NODIA

(iii) Write the value that will be stored in variable a after execution of the following code, if a = 12.
int b=10;
if(a>b)
a=a-3;
a = a * 2;
System.out.println(“a=”+a);

(iv) Find the output of the following code.


int a = 8, b = 3;
while (a < 25) {
a = a + b;
b = a - b;
}
System.out.println(“a=” + a + “ b=” + b);

(v) What will be the values of i and z after the following code executed?
int i = 5, z = 15;
do {
i = i + 3;
z--;
} while (i < 20);

(vi) The following code has error(s).


Rewrite the correct code and underlining all the corrections made :
switch(c)
{
case 1 : a=a+2;
case 2 : a=a+3;
break;
default : a=a-2;
break
}

(vii) Write the Java statement for the following mathematical expression :
s = ut + 1 at2
2

(viii) Write a statement in Java to display:


Best of Luck
for ICSE Examination

(ix) What will be the result of the following two expressions, if x=20 initially?
(a) ++x<=20
(b) x++<=20

(x) Predict the output.


(a) Math.pow(4, 3)+Math.ceil(2.5)
(b) Math.floor(4.6)+Math.ceil(2.5)
Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
ICSC Class 10 Computer Applications Sample Paper 09 Page 5

SECTION B
Attempt any four questions from this section.

QUESTION 3.

Define a class with the following specifications

Class name Employee


Member variables
E. no. Employee number
E. name. Employee of the employee
Age. Age of the employee
Basic. Basic salary (Declare the variables using appropriate data types)
Member methods
Void accept () Accept the details using scanner class
Class name Employee
Void calculate () To calculate the net salary as per the given specifications
Net = basic + hra + da – pf
Hra = 18.5% of basic
Da = 17.45% of basic
Pf = 8.10% of basic
If the age of the employee is above 50 he/she gets an additional allowance of `5000
Void print () To print the details as per the following format
Void main () To create an object of the class and invoke the methods

QUESTION 4.

Define a class MergeDesc to take two sorted arrays as input, merge them into a single array, and display the
merged array in descending order.

Example:

Input:

Array A: 5, 10, 15, 20, 25

Array B: 3, 8, 18, 22, 30

Output:

Merged Array: 30, 25, 22, 20, 18, 15, 10, 8, 5, 3

QUESTION 5.

Write a program to input 15 integers into an array and sort them in ascending order using the bubble sort
algorithm.

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 6 Sample Paper 09 NODIA

QUESTION 6.

Write a Java program to copy all elements from one array to another.

Example:

Original array elements: 6, 3, 4, 9, 8

New array elements: 6, 3, 4, 9, 8

QUESTION 7.

Design a class Railway Ticket with following description:

Instance variables/data members

String name To store the name of the customer


String coach To store the type of coach customer wants to travel
long mob. no. To store customer’s mobile number
int amt To store basic amount of ticket
int total amt 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)
Type of Coaches Amount
First AC 700
Second_AC 500
Third AC 250
Sleeper None
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.

QUESTION 8.

A disarium number is a number where the sum of its digits, each raised to the power of their respective positions,
equals the number itself.

e.g. 135 = 11 + 32 + 53

Hence, 135 is a disarium number.

Design a class Disarium to check, if a given number is disarium number or not.

******

Install NODIA App to See the Solutions.


Click Here To Install

You might also like