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

Computer Application ICSE_Sample Paper 2_X_2024-25

This document is a sample paper for Class X Computer Applications for the academic year 2024-25, consisting of two sections: Section A with multiple-choice questions and Section B with programming tasks. Section A contains 20 questions worth 40 marks, while Section B includes 4 programming questions worth 60 marks. The paper emphasizes Java programming concepts, syntax, and basic algorithms.

Uploaded by

pranayamu2020
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)
12 views

Computer Application ICSE_Sample Paper 2_X_2024-25

This document is a sample paper for Class X Computer Applications for the academic year 2024-25, consisting of two sections: Section A with multiple-choice questions and Section B with programming tasks. Section A contains 20 questions worth 40 marks, while Section B includes 4 programming questions worth 60 marks. The paper emphasizes Java programming concepts, syntax, and basic algorithms.

Uploaded by

pranayamu2020
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

COMPUTER APPLICATIONS

CLASS X (2024-25)
Sample Paper 2
Maximum Marks: 100 Time allowed: 2 hours

 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.
 Attempt all questions from Section A and any four questions from Section B.
 The intended marks for questions or parts of questions are given in brackets [ ].

SECTION A (40 Marks)


(Attempt all questions from this section.)

Question 1 [20]

(i)
ps
Choose the correct answers to the questions from the given options.
Which keyword is used to achieve abstraction in Java?
(a) abstract
(b) interface
(c) extends
(d) implements

(ii) How is abstraction different from encapsulation in Java?


(a) Abstraction is a way to hide data, while encapsulation is a way to hide
implementation details.
(b) Encapsulation is a way to hide data, while abstraction is a way to hide
Ki
implementation details.
(c) Abstraction and encapsulation are the same concepts in Java.
(d) Both abstraction and encapsulation involve hiding implementation details only.

(iii) Which of the following is the correct syntax for the conditional (ternary) operator in
Java?
(a) x ? y : z
(b) x ? y -> z
(c) x : y ? z
(d) x -> y : z

(iv) Which of the following operators is used for exponentiation in Java?


(a) ^
(b) **
(c) %
(d) ~~

© Kips Learning Pvt. Ltd 2024


(v) What is the default value of each element in a character array in Java?
(a) '0'
(b) ' ' (space)
(c) '\u0000'
(d) null

(vi) What is the result of the expression !(5 > 3) in Java?


(a) True
(b) False
(c) It will cause a syntax error.
(d) It will throw a runtime exception.

(vii) What does the default case in a switch statement represent?


(a) It is executed when no other case matches.
(b) It is used to terminate the switch statement.
(c) It is an alternative to the break statement.
(d) It is not a valid keyword in a switch statement.

(viii) How do you check if the next input is an integer using the Scanner class?

(ix)
ps
(a) isInt()
(b) hasNextInt()
(c) nextInt()
(d) checkInt()

How do you close a Scanner object named input in Java?


(a) close(input);
(b) input.close();
(c) Scanner.close(input);
(d) closeScanner(input);
Ki
(x) Which method is used to find the length of a character array in Java?
(a) length()
(b) size()
(c) count()
(d) length

(xi) Which of the following is a valid way to compare if two strings, str1 and str2, are
equal in Java?
(a) str1 == str2
(b) str1.equals(str2)
(c) str1.equals = str2
(d) str1.compare(str2)

(xii) Which class contains the parseInt method in Java?


(a) String
(b) Math
(c) Integer
(d) Scanner

© Kips Learning Pvt. Ltd 2024


(xiii) In Java, how do you call an object's method?
(a) By using the 'new' keyword
(b) By using the 'call' keyword
(c) By using the 'class name' followed by a 'dot' and the 'method name'
(d) By using this keyword

(xiv) Which method is used to convert a string to lowercase in Java?


(a) toLower()
(b) toLowerCase()
(c) convertToLower()
(d) caseLower()

(xv) If a class does not define any constructors, what kind of constructor(s) will be provided
by default in Java?
(a) Default constructor with parameters
(b) No constructor will be provided
(c) Default constructor without parameters
(d) Parameterized constructor with default values

(xvi) ps
Assertion (A): A class in Java is known as an object factory.
Reason (R): Objects are created from a class that contains common attributes and
behaviour.
(a) Both Assertion and Reason are true and Reason is the correct explanation of
Assertion.
(b) Both Assertion and Reason are true and Reason is not the correct explanation of
Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.

(xvii) How is method overloading related to constructors in Java?


Ki
(a) Constructors and methods cannot be overloaded in Java.
(b) Overloading applies only to methods, not constructors.
(c) Constructors and methods can both be overloaded.
(d) Overloading is the same as overriding in Java.

(xviii) Assertion(A): A do-while loop always executes at least once.


Reason(R): A do-while loop is called an exit-controlled loop.
(a) Both Assertion and Reason are true and Reason is the correct explanation of
Assertion.
(b) Both Assertion and Reason are true and Reason is not the correct explanation of
Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.

(xix) What is the purpose of this keyword within a class method in Java?
(a) To refer to the current instance of the class
(b) To create a new object
(c) To access a static variable
(d) To declare a constructor

© Kips Learning Pvt. Ltd 2024


(xx) Which of the following is the correct usage of valueOf to convert a boolean to a
string?
(a) String.valueOf(true)
(b) Boolean.valueOf("true")
(c) String.convert(true)
(d) boolean.valueOf("true")

Question 2
(i) Write the output of the following: [2]
(a) "Java Programming".substring(5, 12)
(b) "Java is fun!".indexOf("Python") + ""
(ii) Predict the output of the following code snippet: [2]
String a = "15";
String b = "3";
int result = Integer.parseInt(a)/Integer.parseInt(b);
System.out.print(result);
(iii) How many times will the following loop execute? [2]
int limit = 8;
for (int i = 3; i <= 10; i++) {
if (i > limit) {
ps break;
}
System.out.println("Iteration " + i);
}

(iv) Name any two types of access specifiers. [2]


(v) Write one difference between Linear Search and Binary Search. [2]
(vi) Answer the following: [2]
(a) Name a string function which removes the blank spaces provided in the prefix and
suffix of a string.
Ki
(b) Name a string function that will convert the int value to 1234 to its string equivalent
"1234".
(vii) Write an import statement that makes the Scanner class available to your program. [2]
(viii) Write the difference between length and length() functions. [2]
(ix) Consider the following class: [2]
public class myClass
{
public static int x = 3, y = 4;
public int a = 2, b = 3;
}
(a) Name the variables for which each object of the class will have its own distinct copy.
(b) Name the variables that are common to all objects of the class.
(x) Create a class with one integer instance variable. Initialise the variable using: [2]
(a) default constructor
(b) parameterised constructor

© Kips Learning Pvt. Ltd 2024


SECTION B (60 Marks)
(Answer any four questions from this section.)

Question 3 [15]
Write a program to accept a number and print it in the reverse order.

Question 4 [15]
Write a program to initialise the given data in an array and find the minimum and maximum
values along with the sum of the given elements.
Numbers: 12, 15, 14, 11, 13
Output:
Minimum value: 11
Maximum value: 15
Sum of the elements: 65

Question 5 [15]
Write a program to input ten words in an array. Arrange these words in descending order of
alphabets, using selection sort technique. Print the sorted array.
ps
Question 6 [15]
Write a program to input a number and check and print whether it is a Pronic number or not.
(Pronic number is a number which is the product of two consecutive integers.)
Examples:
42 = 6 × 72
40 = 15 × 16

Question 7 [15]
Ki
Design a class to overload a function area( ) as follows:
(i) double area (double a, double b, double c) with three double arguments, returns the area
of a scalene triangle using the formula:
𝑎𝑟𝑒𝑎 = √𝑠(𝑠 − 𝑎)(𝑠 − 𝑏)(𝑠 − 𝑐)
where
𝑎+𝑏+𝑐
𝑠=
2
(ii) double area(int a, int b, int height) with three integer arguments, returns the area of a
trapezium using the formula:
1
𝑎𝑟𝑒𝑎 = ℎ𝑒𝑖𝑔ℎ𝑡(𝑎 + 𝑏)
2
(iii) double area(double diagonal1, double diagonal) with two double arguments, returns the
area of a rhombus using the formula:
1
𝑎𝑟𝑒𝑎 = (𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙1 ∗ 𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙2)
2

© Kips Learning Pvt. Ltd 2024


Question 8 [15]
Write a program to display the following pattern.

\********/
*\******/*
**\****/**
***\**/***
****\/****
****/\****
***/**\***
**/****\**
*/******\*
/********\

ps
Ki

© Kips Learning Pvt. Ltd 2024

You might also like