CLASS 10 ICSE JAVA COMPUTER APPLICATIONS SAMPLE PAPER 2024 - 1

Maximum Marks:100

Time allowed: Two 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.
This Paper is divided into two Sections.

Attempt all questions from Section A and any four questions from Section B.

Answers to this Paper must be written on the paper provided separately.

The intended marks for questions or parts of questions are given in brackets[] .
Free Sample Papers (with solutions)

SECTION A

(Attempt all questions from this Section.)



Question 1

(i) Which of the following operators can operate on a boolean variable?
A. && B. == C. ?: D. +=
a) C & B
b) A & D
c) A, B & D
d) A, B & C


(ii) When does Overloading not occur?
a. When more than a single method have the same name, yet different types or number of parameters and different method signature
b. When more than a single method have the same name, the same signature, but have different numbers of signature
c. When more than a single method have the same signature, same name, and the same number of parameters have different types
d. When more than a single method have the same name, the same number and types of parameters, and yet different signatures


(iii) Out of these methods of the String class, which one can be used for testing the strings for equality?
a. isequals()
b. isequal()
c. equals()
d. equal()


(iv) What value is returned by the compareTo() function in case the invoking string happens to be greater than the compared string?
a. a value that is greater than zero
b. a value that is less than zero
c. zero
d. none of the above


(v) Which of the following methods belong to the String class?
(a) length()
(b) substring()
(c) compareTo()
(d) all of the them


(vi) A bundle of similar classes is called a
(a) Package
(b) Packed classes
(c) Group
(d) None


(vii) Akash wants the members of his class Employee to be accessible only to his class “Employee”, what access specifier he should use for the members
(a) Private
(b) Protected
(c) Public
(d) default


(viii) The statement to create an object of class student in Java is :
(a) obj= create Object();
(b) obj=new student();
(c) obj=new Student();
(d) None of the above


(ix) The keyword to create a class is
(a) Class
(b) CLASS
(c) class
(d) None


(x) What will the output of the following program ?
public class Test {
public static void main (string [ ] args) {
int count = 1
while (count <= 15) {
System.out.println(count % 2 == 1? “***” : “+++++” );
++ count; } } }
(a) 15 times ***
(b) 8 times *** and 7 times +++++
(c) 15 times +++++
(d) Both will print only once


(xi) The members of a class are defined inside
(a) ()
(b) {}
(c) []
(d) None of the above


(xii) ……………… objects of a class can be created
(a) 5
(b) Only 1
(c) As many
(d) 2


(xiii) The concept of Abstraction is
(a) Binding data and functions together
(b) Hiding inner complexity and providing usable interfaces
(c) Reusing of the code
(d) Making methods constant


(xiv) “One thing in many different forms” refers to which oops concept
(a) Polymorphism
(b) Abstraction
(c) Encapsulation
(d) None of above


(xv) What Will be the output for:
System.out.print(Character.
toLowerCase('P'));
(a) p
(b) P
(c) false
(d) true


(xvi) Name the package that contains wrapper classes:
(a) java.lang
(b) java.util
(c) java.io
(d) java.awt


(xvii) Corresponding wrapper class of int data type is __________.
(a) integer
(b) INTEGER
(c) Int
(d) Integer


(xviii) State the value of y after the following is executed:
char x='7';
y= Character.isLetter(x);
(a) false
(b) 7
(c) true
(d) ‘7’


(xix) Assertion (A) : In Java more than one method can be created with the same name.
Reason (R) : Java implements polymorphism that allows method to be overloaded
(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) Assertion (A) : A class is an object factory
Reason (R) : Objects are created from class which contains common attribute and behaviour
(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


Question 2

(i) Name the operators listed below :
(i) <
(ii) ++
(iii) &&
(iv) ?:


(ii) Write the prototype of the function 'divide' that takes two integer values and returns the quotient of double type.


(iii) Total Size of array having 25 elements of char type.


(iv) Name two jump statements in java


(v) Declare a 2D of size 2x3 to store only characters.


(vi) What is the output of following :
char c = ‘A’;
short m = 26;
int n = m+c;
System.out.println(n);


(vii) Convert the do-while loop into for loop :
int i =1;
int d = 5;
do {
d=d*2;
System.out.println(d);
i++;
} while(i<=5)


(viii) Find the error in following code and correct it
class test {
public static main();{
int a = 10;
system.out.print line("value a is" a);
} }


(ix) Write the Java expression for √(2𝑎𝑠 + 𝑢2)


(x) What will be the value of y after evaluation the given expression :
y + = ++y + y-- + --y ; when int y =8;




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.




Question 3

Define a class called with the following specifications:
Class name: Item
Member variables: 
String name: name of the item purchased
double price: Price of the item purchased
Member methods:
void accept(): Accept the name and the price of the item using the methods of Scanner class.
void calculate(): To calculate the net amount to be paid by a customer, based on the following criteria:
 Price                Discount
10000 – 35000           5.0%
35001 – 67000           7.5 %
67001 – 100000          10.0%
More than 100000        15.0 %
void display(): To display the name of the item and the net amount to be paid.
Write the main method to create an object and call the above methods


Question 4

Define a class to accept values in integer array of size 10. Sort them in an ascending order using selection
 sort technique. Display the sorted array and print the difference of smallest and the largest element

Question 5

Define a class to accept a string and convert it into uppercase. Display the new word by replacing only the
vowels with the characters following it.
Input: computer
Output: CPMPVTFR

Question 6

Define a class to accept values into a 3×3 array and print the product of its principle diagonal elements along
with the sum of all elements of each row.
Example : Input :
5   8  12
16  17  9
3   4   2
Output :
Product Of Principle Diagonal Elements = 170
Sum Of Elements of Row 1 = 25 
Sum Of Elements Of Row 2 = 42
 Sum Of elements Of Row 3 = 9

Question 7

Define a class to accept a number and check whether it is a tech number or not.
Note: If the number is said to be tech if it split in two equal halves, then the 
square of sum of these halves is equal to the number itself. 
If number of digits is not even then it is not a tech number.
Example:
2025 => 20+25 => 552 => 2025

Question 8

Define a class to overload the method display as follows:
void display(): To print the following format using nested loop
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
    
void display(int n): To print the cube root of each digit of the given number
Example: n = 998
output – 
3.0
3.0
2.0 

Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com