0% found this document useful (0 votes)
1K views

Arihant- Computer 15 th sample paper icse class 10

Uploaded by

scrai1945
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)
1K views

Arihant- Computer 15 th sample paper icse class 10

Uploaded by

scrai1945
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/ 5

sQPCode:PB-15/15 Series i-Succeed15-25/15 Roll No.

Sample Iuestion Paper 16


Computer Applications 10" (Code 86)
N structions
Answer to this paper must be written on the paper provided separately.
-Vou wil not be allowed to wTite during the first 15 minutes. This time is to be spent in
Time:2 Hrs.
reading the question paper.
: The time given at the head of this paper is the time allowed for writing the answers. Max. Marks:100
4This paper is divided into two sections. Attempt all questiorns from Section Aand any
four questions from Section B.
5The intended marks for questions or parts of questions are given in brackets [].

Section A Attempt all questions fromthis section.


1. Choose the correct answers to the questions (v) This loop is also known as endless loop
or unproductive loop. . Understand:ng
from the given options. [20]
(i) Given the following 2D array: "Analysis (a) For loop
(b) While loop
Column 0 Column1 Column 2
(c) Infinite loop
Row 0 7 8 (d) Do-while loop
code
Row 1 11 13
(vi) What is the output for below "Analysis
Row 2 15 16 17 snippet?
System. out.println(Math.floor(-5.
What is the value at array[1][2]? 7) + Math.ceil(-7.5)):
(a) 6 (b) 11 .(a) -13.0 (b) 13
(c) 15 (c) 12 (d) 12.0
(d) 16
of a string
") It is the ability to appear in many forms. (vii) In Java, what isthe last index
. Understunding
Understanding REVIEW?
(a) Inheritance (b) Encapsulation (a) 5 (b)
(c) Data abstraction (d) Polymorphism (c) 0 (d) 1
for combining
(üi) Which of the following separates the (viii) In OOP, what is the termmanipulate the
consecutive variable of same type when data and functions that "Understanding
declaration? " Recall
data into a single unit?
(a). (b), (a) Inheritance
(c): (d); (b) Polymorphism
(iv) Math.pow(64, 1/2)+Math.pow(4,2) ;" Analysis .() Encapsulation
(a) 34 (d) Abstraction
(b) 24
(c) 16 (d) 8
i
134 Succeed Computer
(ix) Consider the array given below:
char ch[]-{
"U'l:
'V, ' ' , 'E',
Reason
code
(R)
Inheritance
reuse and
establishes
Ap licatlonsOas
promotes
hierarchy between classes. anatural
Write the output of the following (a) Both Aand Rare
statements: Analysis correct explanationtrue,
of A.and R0s the
System.out .println(ch[3]*4): (b) Both A and R are
(a) 340 (b) 85 the correct true, but Ris nc
(c) 4 (d) 'U' explanation of A.
(c) A is true, but R is false.
(x) What is the size of long variable? (d) A is false, but R is true.
" Analysis (xvii) What is the correct way to
(a)S bit (b) 16 bit
(c) 32 bit (d) 64 bit
concatenate two String variables
str5 and str7 in Java?
"Analysis
(i) The size of an array that signifies A. str5 + str7:
the number of elements, it can store, B. str5.concat(str7):
is given using .....brackets.
Analysis C. str5. append (str7) ;
(a) {) >(b) [] (a) Only A (b) Only B
(c) () (d) All of these (c) Only C .(d) All A,B,C
(xii) Method prototype for the method (xvii) What does the StringBuilder class in
'nat' which accepts two integer Java do? " Analysis
arguments and returns int value. (a) Creates a mutable sequence of
. Understanding characters
(a) int nat (int a, int b) (b) Creates an immutable sequence of
(b)boolean nat (int a, int b) characters
(c) Boolean nat (int a,b) (c) Provides methods to manipulate
(d) Int nat (a, int b) otoe a r e strings as arrays
(xiii) Which of the following can be used (d) Provides methods to convert strings
as method names in Java? . Recall to numbers

(a) class S (xix) Consider the jumbled code: " Analysis


(b) 1method if (x > 5) {
(c) method _name
int x = 17;
(d) method-name
} else {
SP-15 (xiv) What does the keyword this refer to System.out.println("x is
in a method of a class? " Recall greater than 5"):
(a) The current class System.out.println("x is
(b) The parent class less than or equal to 5°):
(c) The current object
(d) The superclass
(xv) Which of the following wrapper the
Choose the correct order to get
classes does not have a parseXxx
proper output
method for parsing strings to their (b) 2,1,4,3,5,6
(a) 2,1,3,4,5,6
respective primitive types? " Recall
(c) 2,1,5,6,4,3 (d) 2,1,6,4,3,5
(a) Integer Java
(xx) Assertion (A) Methods in
(b) Character
(c) Boolean (d) Double
(xvi) Assertion (A) Inheritance in OOP by becalled
provide code reusability to
allows a new class to be created that allowing a block of code "Ayplieatin
is based on an multiple times.
existing class. Java can
" Application Reason (R) Methods in return
haveparameters and can
135
15
Paper
QUestion
anpe
for (b) System.out . println
them versatile
values,making different (x.charAt(1 )==y.charAt (1) );
performingtaskswith (vii) Predict the output of the following
inputsand outputs.
R are true, and R is
the code snippet: [2]
(a) Both A and
explanation of A. "Analysis
correct char ch='M':
are true, but R is not
b) Both A and R explanation of A.
char chr-Character
the correct .toLowerCase(ch );
but R is false.
(c)A is true, int n=(int) chr-10;
R is true.
(d) A is false, but System. out.printin( (char)
code has error(s). n+"\t"+chr):
2. () The following code and
Rewrite the correct
made (viii) Identify the error in the below code:
underlining all the corrections [21 [2] Analysis
public class Test
. Understanding
Switch(c) public static void
main(string[] args)
case I a-a+2:tobup
break;
case 2 a=a+3; char ch = 4';
boolean result =
default : a=a-2:
break isLetter(ch):
if (result)
System.out.println
when
(ü) Evaluate the given expression (ch + " is a letter. ");
the value of a=1 and b=8 Analysis }
a t= b++ else
System.out.println ("a= "ta);
System.out.println ("b= "+b); System. out.println
(ch + " is not a
(iüiüi) Convert the following segment into letter. "):
an equivalent do-while loop. [2]
int a, b; }
for(a=10,b=20;b)=10; b=b- 2) public boolean
att; " Analysis isLetter(char ch)

(iv) Write a java expression for return Character SP-15


11Wd-5c [2] isLetter(ch);
.Understanding
(v) What will be the values of i and z
code and
after the following code executed? (ix) Consider the below
(2] Analysis identify the type of constructor. (2]
ínt í=0, z=10; "Analysis
do public class MyCl ass
private int value:
i=1+2;rat public MyClass(int val)
}whíle(1<10):
(vi) Write the output of the following value val:
string methods: [2] " Analysis public MyClass()
String x="pen", y="fan":
(a) System. out.printin value 0;
(x.charAt (0)=-y.charAt(0));
136 iSucceed
Computer Applie
public void display()

System.out.println
("Value: " + value); My
objl.display():
obj2.display();
obj3.display():
Clas (90);
public static void obj4.displ ay();
main(String[] args)
(x) Consider the
MyClass objl = new
MyClass (10); segment and following
answer theprogram
MyClass obj2 = new given below: questions
MyC1ass (70); [2
int x[JC]={(1,2),(3,4), "Analysis
MyClass obj3 = new hate (5.6}.{7,8).{9,10},(11,12|):
MyClass (80);
MyC1ass obj4 = new (a) What is the position of 9?
(b) What is the position of 10?
Section B Answer any four questions from this section.
3. DTDCa courier company
charges for
the courier based on the weight
4. Define a class MergeDesc to enter two
of the Sorted arrays and merge into one array
parcel. Define a class with the following in descending order.
specifications: [15] (15]
e.g.
Class name
Member variables
Courier
Array A:
Input:a
2,6,9,12,23
name name of the customer Array B: 1, 11, 12, 32, 45
weight weight of the parcel in Output:
kilograms Merge Array: 45, 32, 23, 12, 12,
address address of the recipient lot 11,9,6,2,1
bill amount to be paid . UnderstandinglAyplication
type D-domestic, I-intermational 5. Define aJava class StringConverter that
Member methods
accepts a string and modifies it
void accept) to accept the details using the according to the following rules: 13]
-15 methods of the Scanner class
only. Convert all consonants in the string to
void calculate() to calculate the bill as per the uppercase. UnderstandinglAylication
following criteria: Replace all spaces in the string with '.
Weight in Kgs Rate per Kg
First 5Kgs 1010
6. Define a class to accept values into ?
array and find and display the sum of
Next 5 Kgs 950 [15)
each row.
Above 10 Kgs 799 "UnderstandinglAyplication
An additional amount of Rs. number
1500 is charged if the type of 7. Write aJava programto entera
number is
the courier is I (nternational) and check whether entered [15]
Pronic number or not.
void print) To print the details whichis
void main() Pronic number is the number integers.
to create and object of the consecutive
class and invoke the the product of two
methods e.g. 110=10*11
UnderstandinglApplication 56-7*8
12=3*4 . Unders
tandinglAyplication
Paper15
QkQuestion
137
&Define a class to overload the method void display(int to
display) as follows: [15] print the
division of mquotient
n, int m) of the
. UnderstandinglApplication and n if m i
vOid display) to print the following format
greater than n otherwise print
the sumn of twice n and thrice
using nested loop.
e eee e double to print the value of z
e eeee
display(double a, z-p°q and p-atb/c andwhere
eeeee double b, double gratbtc
c)

Answers
L )(a) (ü) (d) (ii) (b) (iv) (b) (v) (c)
(vi) (a) (viüi) (a) (vii) (c) (ix) (a) (<) (d) For anSwers, scan
(i) (b) (xii) (a) (xii) (c) (áv) (c) (xv) (b) the given QR code.
(xvi) (a) (xvi) (a) (xvii) (a) (xix) (b) (o) (a)

SP-15

You might also like