Delki Public Schoof Megacity Kolkata
Preboard Examinations 2024-2025
Class: X
Subject: Computer Applications
Duration: 2 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
questton 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 allquestions from SectionA and any four questions from Section B.
The intended marks for questions or parts of questions are given in bracket [].
SECTION A
(Attempt all questions from this Section.)
Question 1
Choose the correct answers to the questions from the given options. (Do not
copy the question, write the correct answers only.) [20]
1)
Name the feature of java depicted in the above picture.
(a) Encapsulation
(b) Inheritance
(c) Abstraction
(d) Dynanic Binding
(ii) int res= A'. What is the value of res?
(a) A
"(b) 65
(c) 97
(d) 'A'
(üi) Amethod with same name as of the class name and with arguments and no
return data type is termed as:
(a) Parameterized Constructor
(b) Non-Parameterized Constructor
(c) Default Constructor
(d) Wrapper class method
Page 1 of 7
(1V) The method to convert a string stored in S variable to
(a) String. toUpperCase(char) upper
(b) [Link](String)
(c) [Link])
Casei
(d) String. touppercase()
(v) Namne the type of error that occurs for the following
[Link]([Link](24 - 25);
(a) Syntax error
((b) run time error
statement:
(c) logical error
(d) no error
(vi) Adata type which contains integer as well as
32 bits space is: fractional part and
(a) byte
(b) char
(c) double
OCcupies
(d) float
(vii) Which of the
Java? following keywords is used to convert a variable in
(a) Final constant in
(b) final
(c) Constant
(d) Const
(viii) The operator
(a) binary which acts on one operand is known as
(b) ternary
(c) unary
(d) relational
(ix)
Parameters used in the method
(a) Formal parameters call statement are
(b) Informal parameters
(c) Void parameters
(d) Actual parameters
(x) The
concept of having more than one
types of parameters
(a) Copy constructoris called constructor in a
class with
(b) Method overloading different
(6)
Constructor Overloading .
() Overloaded methods
(xi) Give the
output of the string
methods:
"MISSISSIPPI".indexOf(S)+ "MISSISSIPPJ».lastIndexOf(1)
(a) 10
(b) 12.
(c) 20
(d) 11
non-returnable method?
(X11) Which of the following types can be used for a
(a) int
(b) float
(c) double
(d) void
(Xiii) Wrapper classes are available in package.
(a) [Link]
(b) [Link]
(c) [Link]
(d) [Link]
(xiv) Static variable belongs to
(a) Object
(b) Class
(c) Identifier
(d) Literal
(xv) Which of the following is valid statement of initializing?
(a) Integer a=new (5);
(b) Integer a=Integer(5);
(c) Integer a=new Integer(5);
(d) Integer a=new ("5°);
(xvi) Which of the following statenents is correct for accepting a character 's'
using Scanner class. jassuming 'sc' as Scanner class object|?
(a) [Link]);
(b) s=[Link]);
(c) s=sc.(char)next);
(d) s=[Link]).charAt(0);
different
(xvii) Assertion(A): A class is used to create similar objects that possess
characteristics and common behavior.
Reason(R): Class is an object factory.
is a correct
(a) Both Assertion (A) and Reason (R are true and Reason (R)
explanation of Assertion (A).
is not a correct
(b) Both Assertion (A) and Reason (R) are true and Reason (R)
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) Read the following text, and choose the correct answer:
cursor while displaying the
There are some characters, used to control the
followed by a specific
values on the screen. They start with backslash(\)
character.
statement?
Which of the following characters describe the above
(a) Unicode
(b) Escape Sequence
(c) ASCII Code
(d) Special Character
Page 3 of 7
AJavastatement written in lowercase or uppercase
(xix) Assertion(A): dilerent.
aretreatedas independentlanguage.
Java isaplatform and Reason(R)is
a.
ReasonR):
(a) Both Assertion (A)and Reason(R) are
true CorTeCt,
(A)
explanation of AssertionReason is
truc and Reason (R) not a coOrr
and (R) arc
(b) Both Assertion (A)
explanation of Assertion (A)
Reason (R) islalse
(c) Assertion (A) is true and true
(d) Assertion (A) is false and Reason (R is
Expression:
(xx) What willbe the value of pvariable for the given Java
double p= [Link]([Link](-2.83, -5.83);
la) 5.83
(b) -5.83
(c) 2.83
(d) -2.83
Question 2
() Write a Java expression to create an object in which Chair is the object of
class Furniture.
(2)
(11) Evaluate the expression and find out the value of Z when the value of
a=10, b=5, Z=10
Z+=a++ | --b +++a %--b [2]
(ii) Give the output of the
String p= "20", q= "19"; following code: [2]
int a=[Link](p);
int b=[Link](g);
[Link](a+b);
(iv) Saloni executes the
prime number or not butfollowing program segment to check a number is
due to some mistake she is not
output. Name the type of error. How the getting correct
Correct answer? program can be modified to get the
void prime(int n)
int c=0;
for(int i=0; i<=n; i++)
if(n%i-=0)
C++;
if(c=-2)
[Link](Prime
else
Number");
[Link]("Not a Prime Number");
(2]
(v) String xl]=Artificial Intelligence", "IOT", "Machine Learning", "Big Data";
Give output of the following statement: [2]
(a) [Link](x[3].substring(4);
(b) [Link](x{[Link]-2].toUpperCase);
Page 4 of 7
while(a-->=0)
[Link](a);
(vii) Consider the following program and answer the questions given [2]
class Sample below:
{
int a,b;
Sample(int x, int y)
a-x; b=y;
void calculate( )
int z;
z=a+b;
[Link](z);
a) Namne the instance variables.
b) Name the local variables. [2]
(vi) Rewrite the given snippet with do-while loop [2]
int a,s=0;
for(a=1;a<=20;a=a+2)
s=sta;
[Link](s);
(ix) String wd = "Computer Applications"; [2]
Write a Java statement to make a word with first four letters of the given
string and display it.
(x) Define infinite loop with an example. [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.
Question 3
Write a program to accept a sentence and a word. Count the number of
times the word is present in it. Display the frequency of the search word.
Example: INPUT
Entera sentence : The quick brown fox jumps over the lazy dog.
Enter a word to be searched : the
OUTPUT
Searched word occurs : 2 timnes. [15]
Page 5 of 7
nrAVIMIIM MARKS: 80
Question 4
Define a class to overload the methods series) as
void series(int p) - todisplay the follows:
following
void series)- display the sum of series givenseries 0,7,26,63,....p terms
:
1 1
Also create a main) method to below : s=1-+-+:
2 3 4 5
invoke the above methods.
[15|
Question 5
The school office keeps the record of
user input) of a class by entering all the students (Number of students will be
Define a class to store names of admission number and name of the students.
all the students along with
admission numbers. Now their
student is present or not. Ifenter
a name of a
student and searchcorresponding
whether the
with admission number, the student is present then
otherwise display display the name along
technique. "Student not found" using linear search
Question 6 [15]
Define a class to accept aA integer
the elements in matrix values into a mxn array. Display all
format. Convert
numbers and all the negative numbers inall positive numbers into negative
array. positive numbers. Display the modified
Example:
Enter the value of m:3
Enter the value of n:4
A]]={ 13, -8, 9, -1}, {-40, 25, 77, 5}, {-5, 20, 11, 4};
13 -89 -1
[15]
-40 0 775
|-5 20 11 4
-138 -9 1
40
5
-77-5
-20 -11|-4
Qúestion 7
Define a class to create a menu driven
user and perform the program to accepta number from the
following:
Press to check whether it is an
1
(A number is said to be an Abundant number or Not.
(excluding Abundant
the number itself) is greaterNumber when the sum of its factors
of 12 are 1,2,3,4,6. Sum of than the number. For example,
Thus 12 is an abundant factors 1+2+3+4+6=16, which is greater thanFactors
12.
Press 2 to calculate the number.)
norm of a number.
(The norm of a number is square
root of the sum of squares of all
number. For example, norm of 68 is 10. i.e, digits of the
10.) 6x6+8x8=100. Square root of 100 is
[15]
Question 8
Define a class Employee having the following
description: -
Data Members:
int parn to store personal account number
Page 6 of 7
m
to store name
String name to store annual taKable income.
double taxincome
to store tax that is calculated
double tax
Member Methods:
Default Constructor
Employee) taxincome
Store the pan number, name,
input) Calculate tax for an employee data
display all the
calc) Output details of an employee i.e.
display)
given conditions,and
members.
compute the tax according to the
Write a program to feFMet
as pe given
display the-otttput
Taxable Income
Tax Rate
No taxX
Total Annual exceeding
Upto Rs. 1,00,000 10% of the income
to Rs. 1,50,000 Rs.1,00,000
From Rs. 1,00,001 Rs.5000+20% of the income
Rs.2,50,000 exceeding Rs.1,50,000
From Rs. 1,50,001 to Rs.25,000+30% of the
income
exceeding Rs.2,50,000
Above Rs.2,50,000
tax for 2
create 2 objects to calculate
main() function and
Also create a [15]
employees.
**************
Page 7 of 7