0% found this document useful (0 votes)
14 views113 pages

Icse 2024 Examination Specimen Question Paper Computer Applications

The document is a specimen question paper for the ICSE 2024 Computer Applications examination, consisting of two sections: Section A with multiple-choice questions and Section B requiring programming tasks. The paper outlines the structure, maximum marks, and time allowed for the exam, along with specific instructions for answering. Students are required to attempt all questions from Section A and any four from Section B, covering various Java programming concepts.

Uploaded by

aryaanstudys777
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)
14 views113 pages

Icse 2024 Examination Specimen Question Paper Computer Applications

The document is a specimen question paper for the ICSE 2024 Computer Applications examination, consisting of two sections: Section A with multiple-choice questions and Section B requiring programming tasks. The paper outlines the structure, maximum marks, and time allowed for the exam, along with specific instructions for answering. Students are required to attempt all questions from Section A and any four from Section B, covering various Java programming concepts.

Uploaded by

aryaanstudys777
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/ 113

ICSE 2024 EXAMINATION

SPECIMEN QUESTION PAPER

COMPUTER APPLICATIONS

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.

The intended marks for questions or parts of questions are given in brackets[ ].

SECTION A
(Attempt all questions from this Section.)

Question 1 [20]
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.)
(i)

Name the feature of java depicted in the above picture.


(a) Encapsulation
(b) Inheritance
(c) Abstraction
(d) Polymorphism

T24 861 – SPECIMEN 1 of 10


(ii) The expression which uses > = operator is known as:
(a) relational
(b) logical
(c) arithmetic
(d) assignment
(iii) Ternary operator is a:

(a) logical operator

(b) arithmetic operator

(c) relational operator

(d) conditional operator

(iv) When primitive data type is converted to a corresponding object of its class, it
is called:

(a) Boxing

(b) Unboxing

(c) explicit type conversion

(d) implicit type conversion

(v) The number of bytes occupied by a character array of 10 elements.

(a) 20 bytes

(b) 60 bytes

(c) 40 bytes

(d) 120 bytes

(vi) The method of Scanner class used to accept a double value is:

(a) nextInt()

(b) nextDouble()

(c) next()

(d) nextInteger()

T24 861 – SPECIMEN 2 of 10


(vii) Among the following which is a keyword:

(a) every

(b) all

(c) case

(d) each

(viii) The output of Math.round(6.6) + Math.ceil(3.4) is:

(a) 9.0

(b) 11.0

(c) 10.0

(d) 11

(ix) Name the type of error, if any in the following statement:

System.out.print("HELLO")

(a) logical

(b) no error

(c) runtime

(d) syntax

(x) Java statement to access the 5th element of an array is:

(a) X[4]

(b) X[5]

(c) X[3]

(d) X[0]

(xi) The output of “Remarkable”.substring(6) is:

(a) mark

(b) emark

(c) marka

(d) able

T24 861 – SPECIMEN 3 of 10


(xii) Which of the following is the wrapper class for the data type char?

(a) String

(b) Char

(c) Character

(d) Float

(xiii) Name the package that contains wrapper classes:

(a) java.lang

(b) java.util

(c) java .io

(d) java.awt

(xiv) Constructor overloading follows which principle of Object Oriented


programming?

(a) Inheritance

(b) Polymorphism

(c) Abstraction

(d) Encapsulation

(xv) Which of the following is a valid Integer constant:

1. 4

2. 4.0

3. 4.3f

4. “four”

(a) Only 1.

(b) 1. and 3.

(c) 2. and 4.

(d) 1. and 2.

T24 861 – SPECIMEN 4 of 10


(xvi) The method compareTo() returns __________ when two strings are equal and
in lowercase :

(a) true

(b) 0

(c) 1

(d) false

(vii) Assertion(A): In java statements written in lower case letter or upper case letter
are treated as the same.

Reason(R): Java is a case sensitive language.

(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:

A class encapsulate Data Members that contains the information necessary to


represent the class and Member methods that perform operations on the data
member.

What does a class encapsulate?

(a) Information and operation

(b) Data members and Member methods

(c) Data members and information

(d) Member methods and operation

T24 861 – SPECIMEN 5 of 10


(xix) Assertion(A): call by value is known as pure method

Reason(R): The original value of variable does not change as operation is


performed on copied values.

(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 false and Reason (R) is true

(d) Assertion (A) is false and Reason (R) is true

(xx) What Will be the output for:


System.out.print(Character.toLowerCase('1'));

(a) 0

(b) 1

(c) A

(d) true

Question 2

(i) Write the Java expression for (p + q)2 [2]

(ii) Evaluate the expression when the value of x = 2: [2]


x = x ++ + ++ x + x

(iii) The following code segment should print “You can go out” if you have done [2]
your homework (dh) and cleaned your room(cr). However, the code has errors.
Fix the code so that it compiles and runs correctly.
boolean dh = True;
boolean cr= true;
if (dh && cr)
System.out.println("You cannot go out");
else
System.out.println("You can go out");

T24 861 – SPECIMEN 6 of 10


(iv) Sam executes the following program segment and the answer displayed is zero [2]
irrespective of any non zero values are given. Name the error. How the program
can be modified to get the correct answer?
void triangle(double b, double h)
{ double a;
a = ½ * b * h;
System.out.println(“Area=”+a); }

(v) How many times will the following loop execute? What value will be returned? [2]
int x=2;
int y=50;
do{
++x;
y-=x++;
}
while(x<=10);
return y;

(vi) Write the output of the following String methods: [2]


(a) "ARTIFICIAL ".indexOf('I' )
(b) “DOG and PUPPY”. trim().length()

(vii) Name any two jump statements. [2]

(viii) Predict the output of the following code snippet: [2]


String a="20";
String b="23";
int p=Integer.parseInt(a);
int q=Integer.parseInt(b);
System.out.print(a+"*"+b);

(ix) When there is no explicit initialization, what are the default values set for [2]
variables in the following cases?
(a) Integer variable
(b) String variable

T24 861 – SPECIMEN 7 of 10


(x) int P [ ]={ 12,14,16,18}; int Q[ ]={ 20,22,24}; [2]
Place all elements of P array and Q array in the array R one after the other.

(a) What will be the size of array R [ ] ?

(b) Write index position of first and last element?

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 [15]

Define a class called with the following specifications:


Class name: Eshop
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
1000 – 25000 5.0%
25001 – 57000 7.5 %
57001 – 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.

T24 861 – SPECIMEN 8 of 10


Question 4 [15]

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.

Question 5 [15]

Define a class to accept a string and convert it into uppercase. Count and display the
number of vowels in it.
Input: robotics
Output: ROBOTICS
Number of vowels: 3

Question 6 [15]

Define a class to accept values into a 3×3 array and check if it is a special array. An array
is a special array if the sum of the even elements = sum of the odd elements.
Example:
A[][]={{ 4 ,5, 6}, { 5 ,3, 2}, { 4, 2, 5}};
Sum of even elements = 4+6+2+4+2 =18
Sum of odd elements= 5+5+3+5=18

Question 7

Define a class to accept a 3 digit number and check whether it is a duck number or not. [15]
Note: A number is a duck number if it has zero in it
Example1:
Input: 2083
Output: Invalid
Example 2:
Input: 103
Output: Duck number

T24 861 – SPECIMEN 9 of 10


Question 8 [15]

Define a class to overload the method display as follows:


void display(): To print the following format using nested loop
1
12
123
1234
12345
void display(int n): To print the square root of each digit of the given number
Example: n = 4329
output – 3.0
1.414213562
1.732050808
2.0

T24 861 – SPECIMEN 10 of 10


COMPUTER APPLICATIONS

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.

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]
Choose the correct answers to the questions from the given options.
(Do not copy the questions, write the correct answers only.)
(i)

Consider the above picture and choose the correct statement from the following:

(a) Polygon is the object and the pictures are classes

(b) Both polygon and the pictures are classes

(c) Polygon is the class and the pictures are objects

(d) Both polygon and the pictures are objects

This paper consists of 11 printed pages and 1 blank page.


T24 861 Turn Over
© Copyright reserved.

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(ii) int x = 98; char ch = (char)x; what is the value in ch?

(a) b

(b) A

(c) B

(d) 97

(iii) The output of the statement "CONCENTRATION".indexOf('T') is:

(a) 9

(b) 7

(c) 6

(d) (-1)

(iv) The access specifier that gives least accessibility is:

(a) package

(b) public

(c) protected

(d) private

(v) The output of the statement "talent".compareTo("genius") is:

(a) 11

(b) –11

(c) 0

(d) 13

(vi) Which of the following is an escape sequence character in Java?

(a) /n

(b) \t

(c) /t

(d) //n

T24 861 2

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(vii) if (a>b&&b>c) then largest number is:

(a) b

(b) c

(c) a

(d) wrong expression

(viii) What is the output of Math.ceil(5.4)+Math.ceil(4.5)?

(a) 10.0

(b) 11.0

(c) 12.0

(d) 9.0

(ix) What is the method to check whether a character is a letter or digit?

(a) isDigit(char)

(b) isLetterOrDigit()

(c) isLetterOrDigit(char)

(d) isLETTERorDIGIT(char)

(x) The extension of a Java source code file is:

(a) exe

(b) obj

(c) jvm

(d) java
(xi) The number of bytes occupied by a character array of four rows and three
columns are:
(a) 12

(b) 24

(c) 96

(d) 48

T24 861 3 Turn Over

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(xii) Which of the following data type cannot be used with switch case construct?

(a) int

(b) char

(c) String

(d) double

(xiii) Which of the following are entry controlled loops?

1. for

2. while

3. do..while

4. switch

(a) only 1

(b) 1 and 2

(c) 1 and 3

(d) 3 and 4

(xiv) Method which reverses a given number is:

(a) Impure method

(b) Pure method

(c) Constructor

(d) Destructor

(xv) If the name of the class is “Yellow”, what can be the possible name for its
constructors?
(a) yellow
(b) YELLOW
(c) Yell
(d) Yellow

T24 861 4

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(xvi) Invoking a method by passing the objects of a class is termed as:

(a) Call by reference

(b) Call by value

(c) Call by method

(d) Call by constructor

(xvii) The correct statement to create an object named mango of class fruit:

(a) Fruit Mango= new fruit();

(b) fruit mango = new fruit();

(c) Mango fruit=new Mango();

(d) fruit mango= new mango();

(xviii) Assertion (A): Static method can access static and instance variables.

Reason (R): Static variable can be accessed only by static method.

(a) Assertion and Reason both are correct.

(b) Assertion is true and Reason is false.

(c) Assertion is false and Reason is true.

(d) Assertion and Reason both are false.

(xix) What is the output of the Java code given below?

String color [ ] = {"Blue", "Red", "Violet"};

System.out.println(color[2].length());

(a) 6

(b) 5

(c) 3

(d) 2

T24 861 5 Turn Over

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(xx) Which of the following mathematical methods returns only an integer?

(a) Math.ceil(n)

(b) Math.sqrt(n)

(c) Math.floor(n)

(d) Math.round(n)

Question 2
(i) Write Java expression for: [2]

|𝑎𝑎 + 𝑏𝑏|
√𝑎𝑎2 + 𝑏𝑏 2

(ii) Evaluate the expression when x is 4: [2]

x + = x + + * + + x % 2;

(iii) Rewrite the following do while program segment using for: [2]

x = 10; y = 20;

do

x++;

y++;

} while (x<=20);

System.out.println(x * y );

(iv) Give the output of the following program segment. How many times is the loop [2]
executed?

for(x=10; x>20;x++)

System.out.println(x);

System.out.println(x*2);

T24 861 6

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


(v) String s1 = "45.50"; String s2 = "54.50"; [2]

double d1=Double.parseDouble(s1);

double d2=Double.parseDouble(s2);

int x= (int)(d1+d2);

What is value of x?

(vi) Consider the following two-dimensional array and answer the questions given [2]
below:

int x[ ][ ] = {{4,3,2}, {7,8,2}, {8, 3,10}, {1, 2, 9}};

(a) What is the order of the array?

(b) What is the value of x[0][0]+x[2][2]?

(vii) Differentiate between boxing and unboxing. [2]

(viii) The following code to compare two strings is compiled, the following syntax [2]
error was displayed – incompatible types – int cannot be converted to boolean.
Identify the statement which has the error and write the correct statement. Give
the output of the program segment.

void calculate()

String a = "KING", b = "KINGDOM";

boolean x = a.compareTo(b);

System.out.println(x);

(ix) Consider the given program and answer the questions given below: [2]

class temp

int a;

temp()

T24 861 7 Turn Over

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


{

a=10;

temp(int z)

a=z;

void print()

System.out.println(a);

void main()

temp t = new temp();

temp x = new temp(30);

t.print();

x.print();

(a) What concept of OOPs is depicted in the above program with two
constructors?

(b) What is the output of the method main()?

(x) Primitive data types are built in data types which are a part of the wrapper [2]
classes. These wrapper classes are encapsulated in the java.lang package. Non
primitive datatypes like Scanner class are a part of the utility package for which
an object needs to be created.

(a) To which package the Character and Boolean classes belong?

(b) Write the statement to access the Scanner class in the program.
T24 861 8

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


SECTION B (60 Marks)
(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 [15]

DTDC a courier company charges for the courier based on the weight of the parcel. Define
a class with the following specifications:

class name: courier

Member variables: name – name of the customer

weight – weight of the parcel in kilograms

address – address of the recipient

bill – amount to be paid

type – ‘D’- domestic, ‘I’- international


Member methods:

void accept ( ) – to accept the details using the methods of the Scanner class only.

void calculate ( ) – to calculate the bill as per the following criteria:

Weight in Kgs Rate per Kg

First 5 Kgs Rs.800

Next 5 Kgs Rs.700

Above 10 Kgs Rs.500

An additional amount of Rs.1500 is charged if the type of the courier


is I (International)

void print ( ) – To print the details

void main ( ) – to create an object of the class and invoke the methods

T24 861 9 Turn Over

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


Question 4 [15]
Define a class to overload the method perform as follows:
double perform (double r, double h) to calculate and return the value of
Curved surface area of cone

𝐶𝐶𝐶𝐶𝐶𝐶 = 𝜋𝜋𝜋𝜋𝜋𝜋 𝑙𝑙 = √𝑟𝑟 2 + ℎ2

void perform (int r, int c) Use NESTED FOR LOOP to generate the
following format
r = 4, c = 5 output – 12345
12345
12345
12345
void perform (int m, int n, char ch) to print the quotient of the division of m and
n if ch is Q else print the remainder of the
division of m and n if ch is R

Question 5 [15]
Define a class to accept a number from user and check if it is an EvenPal number or not.
(The number is said to be EvenPal number when number is palindrome number (a number
is palindrome if it is equal to its reverse) and sum of its digits is an even number.)
Example: 121 – is a palindrome number
Sum of the digits – 1+2+1 = 4 which is an even number

Question 6 [15]
Define a class to accept values into an integer array of order 4 x 4 and check whether it is
a DIAGONAL array or not. An array is DIAGONAL if the sum of the left diagonal
elements equals the sum of the right diagonal elements. Print the appropriate message.
Example:
3 4 2 5 Sum of the left diagonal elements =
2 5 2 3 3 + 5 + 2 + 1 = 11
5 3 2 7 Sum of the right diagonal elements =
1 3 7 1 5 + 2 + 3 + 1 = 11

T24 861 10

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


Question 7 [15]

Define a class pin code and store the given pin codes in a single dimensional array. Sort
these pin codes in ascending order using the Selection Sort technique only. Display the
sorted array.

110061, 110001, 110029, 110023, 110055, 110006, 110019, 110033

Question 8 [15]
Define a class to accept the gmail id and check for its validity.
A gmail id is valid only if it has:
 @

 . (dot)
 gmail
 com
Example: [email protected] is a valid gmail id.

T24 861 11

Click here to buy Latest Educart ICSE Class 10 Books - https://amzn.to/3xib8Bu


CLASS 10
BOOKS

h i P ra c t i c e
# S a a i !
Zar o o r i H

National
Best-selling
Publisher

Books:
Question Banks & Sample Papers BUY
Latest Syllabus & Paper Pattern at special discount

NCERT Textbooks with Solutions

www.educart.co
COMPUTER APPLICATIONS

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.

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]
Choose the correct answers to the questions from the given options.
(Do not copy the questions, write the correct answers only.)
(i) A mechanism where one class acquires the properties of another class:

(a) Polymorphism

(b) Inheritance

(c) Encapsulation

(d) Abstraction

(ii) Identify the type of operator &&:

(a) ternary

(b) unary

(c) logical

(d) relational

This paper consists of 8 printed pages.


T23 861 Turn Over
© Copyright reserved.
(iii) The Scanner class method used to accept words with space:

(a) next()

(b) nextLine()

(c) Next()

(d) nextString()

(iv) The keyword used to call package in the program:

(a) extends

(b) export

(c) import

(d) package

(v) What value will Math.sqrt (Math.ceil (15.3)) return?

(a) 16.0

(b) 16

(c) 4.0

(d) 5.0

(vi) The absence of which statement leads to fall through situation in switch case
statement?

(a) continue

(b) break

(c) return

(d) System.exit(0)

(vii) State the type of loop in the given program segment:


for (int i = 5; i ! = 0; i - = 2)
System.out.println(i);

(a) finite

(b) infinite

(c) null

(d) fixed

T23 861 2
(viii) Write a method prototype name check() which takes an integer argument and
returns a char:
(a) char check()
(b) void check (int x)
(c) check (int x)
(d) char check (int x)
(ix) The number of values that a method can return is:
(a) 1
(b) 2
(c) 3
(d) 4
(x) Predict the output of the following code snippet: String P = "20", Q ="22";
int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a+""+b);
(a) 20
(b) 20 22
(c) 2220
(d) 22
(xi) The String class method to join two strings is:
(a) concat(String)
(b) <string>.joint(string)
(c) concat(char)
(d) Concat()
(xii) The output of the function "COMPOSITION".substring(3, 6):
(a) POSI
(b) POS
(c) MPO
(d) MPOS
T23 861 3 Turn Over
(xiii) int x = (int) 32.8; is an example of __________ typecasting.
(a) implicit
(b) automatic
(c) explicit
(d) coercion

(xiv) The code obtained after compilation is known as:


(a) source code
(b) object code
(c) machine code
(d) java byte code

(xv) Missing a semicolon in a statement is what type of error?


(a) Logical
(b) Syntax
(c) Runtime
(d) No error

(xvi) Consider the following program segment and select the output of the same
when n = 10 :
switch(n)
{case 10 : System.out.println(n*2);
case 4 : System.out.println(n*4); break;
default : System.out.println(n);
}

20
(a)
40
10
(b)
4

(c) 20, 40

10
(d)
10

T23 861 4
(xvii) A method which does not modify the value of variables is termed as:
(a) Impure method
(b) Pure method
(c) Primitive method
(d) User defined method

(xviii) When an object of a Wrapper class is converted to its corresponding primitive


data type, it is called as ___________.
(a) Boxing
(b) Explicit type conversion
(c) Unboxing
(d) Implicit type conversion

(xix) The number of bits occupied by the value ‘a’ are:


(a) 1 bit
(b) 2 bits
(c) 4 bits
(d) 16 bits

(xx) Method which is a part of a class rather than an instance of the class is termed
as:
(a) Static method
(b) Non static method
(c) Wrapper class
(d) String method

Question 2
(i) Write the Java expression for (𝑎𝑎 + 𝑏𝑏)𝑥𝑥 . [2]

(ii) Evaluate the expression when the value of x = 4: [2]


x * = - - x + x++ + x

T23 861 5 Turn Over


(iii) Convert the following do…while loop to for loop: [2]
int x=10;
do
{x– –;
System.out.print(x);
}while (x>=1);
(iv) Give the output of the following Character class methods: [2]
(a) Character.toUpperCase ('a')
(b) Character.isLetterOrDigit('#')
(v) Rewrite the following code using the if-else statement: [2]
int m= 400;
double ch = (m>300) ? (m / 10.0) * 2: (m / 20.0) - 2;
(vi) Give the output of the following program segment: [2]
int n = 4279; int d;
while(n>0)
{d=n%10;
System.out.println(d);
n=n/100;
}
(vii) Give the output of the following String class methods: [2]
(a) "COMMENCEMENT" . lastIndexOf('M')
(b) "devote" . compareTo("DEVOTE")
(viii) Consider the given array and answer the questions given below: [2]
int x[ ]={4,7,9,66,72,0,16};
(a) What is the length of the array?
(b) What is the value in x[4]?
(ix) Name the following: [2]
(a) What is an instance of the class called?
(b) The method which has same name as that of the class name.

T23 861 6
(x) Write the value of n after execution: [2]
char ch ='d';
int n = ch + 5;

SECTION B (60 Marks)


(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 [15]
Design a class with the following specifications:
Class name: Student
Member variables: name – name of student
age – age of student
mks –marks obtained
stream – stream allocated
(Declare the variables using appropriate data types)
Member methods:
void accept() – Accept name, age and marks using methods of Scanner class.
void allocation() – Allocate the stream as per following criteria:
mks stream
> = 300 Science and Computer
> = 200 and < 300 Commerce and Computer
> = 75 and 200 Arts and Animation
< 75 Try Again
void print() – Display student name, age, mks and stream allocated.
Call all the above methods in main method using an object.

Question 4 [15]
Define a class to accept 10 characters from a user. Using bubble sort technique arrange
them in ascending order. Display the sorted array and original array.

T23 861 7 Turn Over


Question 5 [15]
Define a class to overload the function print as follows:
void print() to print the following format
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
5 5 5 5
void print(int n) To check whether the number is a lead number. A
lead number is the one whose sum of even digits are
equal to sum of odd digits.
e.g. 3669 odd digits sum = 3 + 9 = 12
even digits sum = 6 + 6 = 12
3669 is a lead number.

Question 6 [15]
Define a class to accept a String and print the number of digits, alphabets and special
characters in the string.
Example: S = “KAPILDEV@83”
Output: Number of digits – 2
Number of Alphabets – 8
Number of Special characters – 1

Question 7 [15]
Define a class to accept values into an array of double data type of size 20. Accept a double
value from user and search in the array using linear search method. If value is found
display message “Found” with its position where it is present in the array. Otherwise
display message “not found”.

Question 8 [15]
Define a class to accept values in integer array of size 10. Find sum of one digit number
and sum of two digit numbers entered. Display them separately.
Example: Input: a[ ] = {2, 12, 4, 9, 18, 25, 3, 32, 20, 1}
Output: Sum of one digit numbers : 2 + 4 + 9 + 3 + 1 = 19
Sum of two digit numbers : 12 + 18 + 25 + 32 + 20 = 107

T23 861 8
COMPUTER APPLICATIONS

(Theory)

(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.

The intended marks for questions or parts of questions are given in brackets[].

SECTION A (40 Marks)


Attempt all questions

Question 1.
(a) Define abstraction. [2]

(b) Differentiate between searching and sorting. [2]

(c) Write a difference between the functions isUpperCase( ) and toUpperCase( ). [2]

(d) How are private members of a class different from public members? [2]

(e) Classify the following as primitive or non-primitive datatypes: [2]

(i) char

(ii) arrays

(iii) int

(iv) classes

This Paper consists of 6 printed pages.


T18 861 Turn Over
© Copyright Reserved

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 2.

(a) (i) int res = 'A'; [2]

What is the value of res?

(ii) Name the package that contains wrapper classes.

(b) State the difference between while and do while loop. [2]

(c) System.out.print("BEST "); [2]

System.out.println("OF LUCK");

Choose the correct option for the output of the above statements

(i) BEST OF LUCK

(ii) BEST

OF LUCK

(d) Write the prototype of a function check which takes an integer as an argument [2]
and returns a character.

(e) Write the return data type of the following function. [2]

(i) endsWith()

(ii) log()

Question 3.
(a) Write a Java expression for the following: [2]

√3𝑥 + 𝑥 2
𝑎+𝑏

(b) What is the value of y after evaluating the expression given below? [2]
y+= ++y + y-- + -- y; when int y=8

(c) Give the output of the following: [2]

(i) Math.floor (-4.7)

(ii) Math.ceil(3.4) + Math.pow(2, 3)

(d) Write two characteristics of a constructor. [2]

T18 861 2

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(e) Write the output for the following: [2]
System.out.println("Incredible"+"\n"+"world");
(f) Convert the following if else if construct into switch case [2]
if( var==1)
System.out.println("good");
else if(var==2)
System.out.println("better");
else if(var==3)
System.out.println("best");
else
System.out.println("invalid");

(g) Give the output of the following string functions: [2]

(i) "ACHIEVEMENT".replace('E', 'A')

(ii) "DEDICATE".compareTo("DEVOTE")
(h) Consider the following String array and give the output [2]

String arr[]= {"DELHI", "CHENNAI", "MUMBAI", "LUCKNOW",


"JAIPUR"};

System.out.println(arr[0].length()> arr[3].length());

System.out.print(arr[4].substring(0,3));

(i) Rewrite the following using ternary operator: [2]


if (bill >10000 )
discount = bill * 10.0/100;
else
discount = bill * 5.0/100;

(j) Give the output of the following program segment and also mention how many [2]
times the loop is executed:
int i;
for ( i = 5 ; i > 10; i ++ )
System.out.println( i );
System.out.println( i * 4 );

T18 861 3 Turn Over

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


SECTION B (60 Marks)
Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either Blue J environment or any
program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes so that the logic
of the program is clearly depicted.
Flow-Charts and Algorithms are not required.

Question 4.
Design a class RailwayTicket with following description: [15]

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 mobno : To store customer’s mobile number

int amt : To store basic amount of ticket

int totalamt : 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.

T18 861 4

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 5.

Write a program to input a number and check and print whether it is a Pronic number [15]
or not. (Pronic number is the number which is the product of two consecutive integers)

Examples: 12 = 3  4

20 = 4  5

42 = 6  7

Question 6.

Write a program in Java to accept a string in lower case and change the first letter of [15]
every word to upper case. Display the new string.

Sample input: we are in cyber world

Sample output: We Are In Cyber World

Question 7.
Design a class to overload a function volume() as follows: [15]

(i) double volume (double R) – with radius (R) as an argument, returns the volume
of sphere using the formula.

V = 4/3  22/7  R3

(ii) double volume (double H, double R) – with height(H) and radius(R) as the
arguments, returns the volume of a cylinder using the formula.

V = 22/7  R2  H

(iii) double volume (double L, double B, double H) – with length(L), breadth(B) and
Height(H) as the arguments, returns the volume of a cuboid using the formula.

V=LBH

T18 861 5 Turn Over

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 8.

Write a menu driven program to display the pattern as per user’s choice.

Pattern 1 Pattern 2 [15]


ABCDE B
ABCD LL
ABC UUU
AB EEEE
A
For an incorrect option, an appropriate error message should be displayed.

Question 9.
[15]
Write a program to accept name and total marks of N number of students in two single
subscript array name[ ] and totalmarks[ ].

Calculate and print:

(i) The average of the total marks obtained by N number of students.


[average = (sum of total marks of all the students)/N]

(ii) Deviation of each student’s total marks with the average.


[deviation = total marks of a student – average]

T18 861 6

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

(Theory)

(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.

The intended marks for questions or parts of questions are given in brackets[].

SECTION A (40 Marks)


Attempt all questions

Question 1.
(a) What is inheritance? [2]

(b) Name the operators listed below: [2]


(i) <
(ii) ++
(iii) &&
(iv) ? :

(c) State the number of bytes occupied by char and int data types. [2]

(d) Write one difference between / and % operator. [2]

(e) String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", [2]


"BLACKBERRY"};
Give the output of the following statements:
(i) System.out.println(x[1]);
(ii) System.out.println(x[3].length ( ));

This Paper consists of 5 printed pages and 1 blank page.


T17 861 Turn Over
© Copyright Reserved

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 2.
(a) Name the following: [2]

(i) A keyword used to call a package in the program.

(ii) Any one reference data type.

(b) What are the two ways of invoking functions? [2]

(c) State the data type and value of res after the following is executed: [2]

char ch='t';

res= Character.toUpperCase(ch);

(d) Give the output of the following program segment and also mention the number [2]
of times the loop is executed:
int a,b;
for (a = 6, b = 4; a <= 24; a = a + 6)
{
if (a%b ==0)
break;
}
System.out.println(a);
(e) Write the output: [2]
char ch = 'F';
int m = ch;
m=m+5;
System.out.println(m + " " + ch);

Question 3.
(a) Write a Java expression for the following: [2]

ax5 + bx3+c

(b) What is the value of x1 if x=5? [2]

x1= ++x – x++ + --x

(c) Why is an object called an instance of a class ? [2]

T17 861 2

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(d) Convert following do-while loop into for loop. [2]
int i = 1;
int d=5;
do {
d=d*2;
System.out.println(d);
i++ ; } while ( i<=5);
(e) Differentiate between constructor and function. [2]
(f) Write the output for the following: [2]
String s="Today is Test" ;
System.out.println(s.indexOf('T'));
System.out.println(s.substring(0,7) + " " +"Holiday");
(g) What are the values stored in variables r1 and r2: [2]
(i) double r1 = Math.abs(Math.min(-2.83, -5.83));
(ii) double r2 = Math.sqrt(Math.floor(16.3));
(h) Give the output of the following code: [2]
String A ="26", B="100";
String D=A+B+"200";
int x= Integer.parseInt(A);
int y = Integer.parseInt(B);
int d = x+y;
System.out.println("Result 1 = "+D);
System.out.println("Result 2 = " +d);
(i) Analyze the given program segment and answer the following questions: [2]
for(int i=3;i<=4;i++ ) {
for(int j=2;j<i;j++ ) {
System.out.print("" ); }
System.out.println("WIN" ); }
(i) How many times does the inner loop execute?
(ii) Write the output of the program segment.
(j) What is the difference between the Scanner class functions next() and [2]
nextLine()?

T17 861 3 Turn Over

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


SECTION B (60 Marks)
Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either Blue J environment or any
program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes so that the logic
of the program is clearly depicted.
Flow-Charts and Algorithms are not required.
Question 4.
Define a class ElectricBill with the following specifications: [15]
class : ElectricBill
Instance variables / data member:
String n – to store the name of the customer
int units – to store the number of units consumed
double bill – to store the amount to be paid
Member methods:
void accept( ) – to accept the name of the customer and number of units consumed
void calculate( ) – to calculate the bill as per the following tariff:
Number of units Rate per unit
First 100 units Rs.2.00
Next 200 units Rs.3.00
Above 300 units Rs.5.00
A surcharge of 2.5% charged if the number of units consumed is above 300 units.
void print ( ) - To print the details as follows:
Name of the customer: ………………………
Number of units consumed: ………………………
Bill amount: ………………………
Write a main method to create an object of the class and call the above member
methods.

Question 5.

Write a program to accept a number and check and display whether it is a spy number [15]

or not. (A number is spy if the sum of its digits equals the product of its digits.)
Example: consider the number 1124, Sum of the digits = 1 + 1 + 2 + 4 = 8
Product of the digits = 1  1  2  4 = 8
T17 861 4

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 6.
Using switch statement, write a menu driven program for the following: [15]
(i) To find and display the sum of the series given below:
𝑆 = 𝑥1 − 𝑥 2 + 𝑥 3 − 𝑥 4 + 𝑥 5 . . . . . . . . . . . . . . . .. − 𝑥 20
(where x = 2)
(ii) To display the following series:
1 11 111 1111 11111
For an incorrect option, an appropriate error message should be displayed.

Question 7.
Write a program to input integer elements into an array of size 20 and perform the [15]
following operations:
(i) Display largest number from the array.
(ii) Display smallest number from the array.
(iii) Display sum of all the elements of the array.

Question 8.
Design a class to overload a function check( ) as follows: [15]
(i) void check (String str , char ch ) - to find and print the frequency of a character
in a string.
Example :
Input: Output:
str = "success" number of s present is =3
ch = 's'
(ii) void check(String s1) - to display only vowels from string s1, after converting
it to lower case.
Example :
Input:
s1 ="computer" Output : o u e

Question 9.
Write a program to input forty words in an array. Arrange these words in descending [15]
order of alphabets, using selection sort technique. Print the sorted array.

T17 861 5

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


T17 861 6

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


FOREWORD

This document of the Analysis of Pupil Performance at the ICSE (Class-10) Examination is a
unique tool for retrospection for both, teachers and students. It has grown and evolved over
the years to provide feedback to all concerned in terms of the strengths and weaknesses of the
candidates in handling the ICSE examinations.

We commend the work of Mrs. Shilpi Gupta and the team at the RDCD who have
painstakingly prepared this analysis. We are grateful to the examiners who have contributed
through their comments on the performance of the candidates under examination as well as
for their suggestions to teachers and students for the effective transaction of the syllabus.

We hope the schools will find this document useful in more ways than one. We invite
comments from schools on further improving its utility and quality.

Gerry Arathoon
November, 2016 Chief Executive & Secretary

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


The Council has been involved in the preparation of the ICSE and ISC Analysis of Pupil
Performance documents since the year 1994. Over these years, these documents have
facilitated the teaching-learning process by providing subject/ paper wise feedback to
teachers regarding performance of students at the ICSE and ISC examinations. With the aim
of ensuring wider accessibility to all stakeholders, from the year 2014, the ICSE and the ISC
documents have also been made available on the Council’s website.
The documents which comprise of one Volume for ICSE and three Volumes for
ISC (Languages, Commerce and Humanities) aim to provide a detailed quantitative and
qualitative analysis of the performance of candidates for various subjects, including the
overall performance of the candidates, examiners’ comments on common errors made by
candidates, topics found difficult or confusing, marking scheme for each question and
suggestions for teachers/ candidates.
It is hoped that while on one hand, feedback provided in this document will enable teachers
to understand the assessment/ evaluation process better and help them in guiding their
students more effectively and comprehensively, it will also help students in preparing for the
ICSE/ ISC Examinations, with a better understanding of what is required from them in the
examination.
The Analysis of Pupil Performance document for ICSE for the Examination Year 2016 covers
14 subjects/papers. The ISC Analysis of Pupil Performance document for the year 2016 covers
21 subjects/papers. On popular demand, the subject Business Studies has been added to the
list of subjects for which the analysis is done at the ISC level.
The RDCD team of Mr. Richard Ellis, Dr Manika Sharma and Ms. Mansi Guleria have done a
commendable job in preparing this document. I would also like to thank Mr. M R Felix of the
IT department for providing the statistical data.

Shilpi Gupta
November, 2016 Deputy Head - RDCD

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

STATISTICS AT A GLANCE
Total Number of students who took the examination 99,856
Highest Marks Obtained 100
Lowest Marks Obtained 27
Mean Marks Obtained 83.28

Percentage of Candidates according to marks obtained


Mark Range
Details
0-20 21-40 41-60 61-80 81-100
Number of Candidates 0 45 9,459 29,331 61,021
Percentage of Candidates 0.00 0.05 9.47 29.37 61.11
Cumulative Number 0 45 9,504 38,835 99,856
Cumulative Percentage 0.00 0.05 9.52 38.89 100.00

Range of Marks Obtained

70.00 61.11

60.00
Percentage of Candidates

50.00

40.00 29.37

30.00

20.00 9.47
0.00 0.05
10.00

0.00
0-20 21-40 41-60 61-80 81-100

Marks Obtained

239

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

ANALYSIS OF PERFORMANCE

Question 1.
(a) Define Encapsulation. [2]
(b) What are keywords? Give an example. [2]
(c) Name any two library packages. [2]
(d) Name the type of error ( syntax, runtime or logical error ) in each case given below: [2]
(i) Math.sqrt (36 – 45)
(ii) int a;b;c;
(e) If int x [ ] = { 4, 3 , 7, 8, 9, 10}; what are the values of p and q? [2]
(i) p = x.length
(ii) q= x[2] + x[5] * x[1]

Comments of Examiners
1. Suggestions for teachers
(a) A number of candidates answered correctly.
However, some candidates confused  Basic principles such as
Encapsulation with Data abstraction. Encapsulation, Polymorphism etc.
(b) Examples of keywords were written in capital should be explained properly with
letters. For example, This, New, Public …. etc. examples.
(c) Majority of candidates wrote the full word instead  Explain the importance of case
of the name of the package. For example, utility sensitivity while writing keywords.
was written instead of util.  Difference between class and
(d) Many candidates were confused between runtime package must be explained with
and logical errors and therefore wrote incorrect examples.
answers.  Explain different types of errors
(e) The first part was answered correctly by most with examples on the computer with
candidates. In the second part of the question clear cut differences.
some candidates were not clear about index  Calculation of length of an array and
position of the array and hence used wrong values retrieving an element from a given
for calculation of the answer. array should be practiced.

240

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 1.
(a) The wrapping up of data and functions (that operate on the data) into a single unit( called class)
is known as encapsulation
OR
It is the way of combining both data and the functions that operate on that data under a single
unit.
(Correct definition in any form)

(b) Keywords are the words that convey a special meaning to the language Compiler. These are
reserved for special purpose and must not be used as normal identifiers.
(Correct explanation with an example)
(c) java.io.* or io package
java.util.* or util package
(Any 2 library packages)
(d) (i) Runtime error
(ii) Syntax error
(e) (i ) 6
(ii) 37

Question 2.

(a) State the difference between == operator and equals ( ) method . [2]
(b) What are the types of casting shown by the following examples: [2]
(i) char c = (char)120;
(ii) int x = 't';
(c) Differentiate between formal parameter and actual parameter. [2]
(d) Write a function prototype of the following : [2]
A function PosChar which takes a string argument and a character argument and returns
an integer value.
(e) Name any two types of access specifiers. [2]

241

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Comments of Examiners
2. Suggestions for teachers

(a) Most candidates answered correctly. However,  Give examples of the use of ==
some candidates confused == operator with operator and equals () method and
assignment operator. practice exercise questions based on
(b) Some candidates were unsure of the answer. They the above topics.
seem to have overlooked the mention of (char)120  Explain each type of conversion with
in the question and therefore interchanged the proper examples and point out the
answers. difference between them.
(c) A number of candidates were confused between  Explain the terms such as formal
formal parameters and actual parameters. parameters and actual parameters and
(d) Many candidates were unable to write the illustrate them with several examples
function prototype. Some did not use the same  Explain various parts of a function
variable name as mentioned in the question. with different examples. Make it
(e) Most candidates answered correctly. clear that the formal parameters
require data types and variable
names.
 Students should be reminded
constantly about the importance of
case sensitivity while writing
keywords.

MARKING SCHEME
Question 2.
(a) == is an operator which is used to check the equality between primitive data type
equals () function checks the equality between Strings
(b) (i) explicit type casting
(ii) implicit type casting
(c) Actual parameter : The parameter which is present in the function call statement is called
actual parameter. It stores the original value.
Formal parameter : The parameter which is present in function prototype or function
signature is called formal parameter. It stores the duplicate value.
(d) int PosChar( String s, char ch)

(e) public /private/protected (Any two)

242

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 3.
(a) Give the output of the following string functions : [2]
(i) "MISSISSIPPI".indexOf('S')+ "MISSISSIPPI".lastIndexOf('I')
(ii) "CABLE".compareTo("CADET")
(b) Give the output of the following Math functions : [2]
(i) Math.ceil(4.2)
(ii) Math.abs(-4)
(c) What is a parameterized constructor? [2]
(d) Write down java expression for : [2]
T = √𝑨𝑨𝟐𝟐 + 𝑩𝑩𝟐𝟐 + 𝑪𝑪𝟐𝟐

(e) Rewrite the following using ternary operator: [2]


if (x%2 == 0)
System.out.print("EVEN");
else
System.out.print("ODD");
(f) Convert the following while loop to the corresponding for loop: [2]
int m = 5, n = 10;
while (n>=1)
{
System.out.println(m*n);
n-- ;
}
(g) Write one difference between primitive data types and composite data types [2]
(h) Analyze the given program segment and answer the following questions: [2]
(i) Write the output of the program segment
(ii) How many times does the body of the loop gets executed?
for (int m=5; m<=20; m+=5)
{ if (m%3==0)
break;
else
if (m%5==0)
System.out.println(m);
continue;
}
(i) Give the output of the following expression : [2]
a+= a++ + ++a + --a + a-- ; when a = 7
(j) Write the return type of the following library functions: [2]
(i) isLetterOrDigit(char)
(ii) replace(char, char)

243

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Comments of Examiners
3. Suggestions for teachers
(a) A few candidates answered both parts correctly.  String functions should be taught
However, some candidates lacked the knowledge using examples. Practice questions on
of String functions especially compare to () multiple String functions must be
function. given in class regularly.
(b) In the first part of the question some candidates  Practice exercises on evaluation of the
got confused regarding the output of the Math multiple and single mathematical
function ceil () However, majority of candidates functions must be given.
answered the second part of the question  Explain what is constructor, its need
correctly. in the program. Then explain the basic
(c) Many candidates had defined what is constructor difference between default and
instead of parametrized constructor. parametrized constructors.
(d) Mathematical functions are so often used in Java  Math class, its functions and syntax
but many candidates were unfamiliar with the must be taught in detail.
syntax. Some of the errors made in this question  Ternary operator, if…else statement
were: with different examples and
T= math. sqrt(math.pow (A,2)+(B,2)+(C,2)); conversion from ternary operator to
T=Math.sqr(Math.pow(A+B+C),2); if…else and vice versa must be taught
(e) A number of candidates were unfamiliar with the clearly.
working of a ternary operator. Some of the errors  Sufficient examples of inter
made in this question are: conversion between while loop and
If (x%2==0) ? EVEN: ODD; for loop and vice versa must be
(x% 2= 0) ? “EVEN”: “ODD”; worked out on the board.
 Explain all technical terms,
(f) Several candidates were confused with multiple differences between them and ensure
initialization in the question and some forgot to that students understand them
update the control variable. thoroughly.
(g) Majority of candidates were able to answer this  Provide more practice questions on
question correctly. First part was well answered iterative processes where students
by most candidates where as in the second part have to predict the output especially
some candidates got confused as to how many using output statements.
times body of the loop gets executed.  Order of evaluation of expression
(h) using arithmetic, assignment
(i) A number of candidates did not add the initial operators and increment and
value of the variable ‘a’ to the resulting value of decrement operators must be clearly
the expression. They were not aware that in an explained in class along with
expression of type a+= , the variable gets its examples.
initial value .  Emphasize on the return type of all the
(j) Many candidates answered the first part of the string functions given in the syllabus.
question correctly, whereas majority of
candidates wrote char as the answer instead of
String in the second part of the question.

244

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 3.
(a) (i) 2 +10 = 12
(ii) - 2

(b) (i) 5.0


(ii) 4
(c) Constructors that take arguments are called parameterized constructors

(d) Math.sqrt(Math.pow(A,2)+ Math.pow( B,2)+ Math.pow(C,2))


OR
Math.sqrt((A*A+B*B+C*C))

(e) System.out.println((x%2==0)?"EVEN":"ODD");

(f) for ( int m = 5 , n = 10; n > = 1; n-- )


{
System.out.println ( m * n ) ;
}
(g) Primitive data types Composite data types
1. fundamental data types. Constructed using primitive data types
2. Size is fixed Size depends on the member variables/instance
Variables
3. Primitive data type is passed by value Composite data type is passed by reference.
(h) m=5
10 Loop is executed 3 times
(i) a = 7 + 7 + 9 + 8 + 8 = 39

(j) boolean and String

245

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


SECTION B (60 Marks)
Attempt any four questions from this Section.
Question 4. [15]
Define a class named BookFair with the following description :
Instance variables /Data members :
String Bname - stores the name of the book
double price - stores the price of the book
Member methods :
(i) BookFair() - Default constructor to initialize data members
(ii) void Input() - To input and store the name and the price of the book.
(iii) void calculate() - To calculate the price after discount. Discount is calculated
based on the following criteria
Price Discount
Less than or equal to `1000 2% of price
More than ` 1000 and less than or equal to ` 3000 10% of price
More than ` 3000 15% of price
(iv) void display() - To display the name and price of the book after discount.
Write a main method to create an object of the class and call the above member methods.

Comments of Examiners
4. Many candidates answered this question Suggestions for teachers
correctly. Some common errors found were:  Train students to use the same names
(i) Using a different class name than the one given for variables and methods as given in
in the question. the question.
(ii) constructor syntax was incorrect (return type  Constructor syntax to be explained
void was used, variables were declared inside comprehensively with additional
revision and practice on writing
the constructor). constructors.
(iii) A single function was used instead of the one  Programs on multiple functions of all
asked for in the question. types to be revised on a consistent
(iv) Price after discount was not calculated. basis.
(v) Use of ≤ and ≥ instead of the operators < = and  Guide and instruct students to
>= , using commas in numbers convert English statements having
(vi) Some candidates wrote input method with conditions with ranges to JAVA
if…else statements using proper
parameters but got confused with the local and relational operators.
global variables.  Advise students, in school exams
(vii) Syntax for object creation and function call against using ≤ and ≥ instead of < =
were incorrect. and >=.
 Difference between global and local
variables and how to use them in
multiple function programs should be
explained clearly in class.
 Creation of an object and invoking
methods using the object need to be
practiced thoroughly.

246

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 4.
import java.util.*;
class BookFair {
String Bname;
double price;
BookFair() {
Bname="";
price =0.0d; }
void input() {
Scanner sc=new Scanner(System.in);
System.out.println("Enter Name and Price " );
Bname=sc.next();
price=sc.nextDouble(); }
void calculate() {
if(price<=1000)
price= price-price*2/100;
else if(price<=3000)
price =price-price*10/100;
else
price =price-price*15/100; }
void display() {
System.out.println("Name :" +Bname);
System.out.println("Price :" +price); }
public static void main(String args[])
{
BookFair obj=new BookFair();
obj.input();
obj. calculate();
obj.display();
}}
Variable description/Mnemonic codes

247

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 5.
Using the switch statement , write a menu driven program for the following: [15]
(i) To print the Floyd’s triangle [Given below]
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
(ii) To display the following pattern
I
IC
ICS
I CSE
For an incorrect option, an appropriate error message should be displayed.

Comments of Examiners
5. Common errors made by candidates while Suggestions for teachers
attempting this question were:
(i) Menu not displayed or choice not input.  Menu driven programs using switch
(ii) Wrote two separate programs instead of one. …case should be practiced in class.
(iii) Syntax of switch and default statements were  The significance of break and default
wrong. statements should be explained.
(iv) Forgot to write break statement.  Adequate examples and exercise
(v) Using println() in place of print() and vice versa. questions based on loop concept and
(vi) The patterns were obtained with multiple print nested loop must be given in class.
statements row after row.  Method of extracting character
should be explained to candidates.
Other mistakes observed were:
(i) Candidates printed the loop variable instead of
using a counter and using it for printing the output.
(ii) Candidates did not know how to extract a letter from a string.

248

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 5.
import java .util.*;
class ques5 {
public static void main(String args[]) {
Scanner obj = new Scanner (System.in);
int choice,x; System.out.println("Enter 1 pattern1 , 2 Pattern2");
choice =obj.nextInt();
switch(choice) {
case 1: int r, c, k = 1;
for (r = 1; r <= 5 ; r ++) {
for (c=1;c<=r;c++) {
System.out.print(“ “+k);
k++; }
System.out.println(); }
break;
case 2:
String s="ÏCSE";
for(int i=0;i<s.length();i++ ) {
System.out.println(s.substring(0,i+1)); }
break;
default : System.out.println("Sorry wrong choice");
}
}
}
Variable description/Mnemonic codes

249

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 6.
Special words are those words which starts and ends with the same letter. [15]
Examples:
EXISTENCE
COMIC
WINDOW
Palindrome words are those words which read the same from left to right and vice-versa
Examples:
MALAYALAM
MADAM
LEVEL
ROTATOR
CIVIC
All palindromes are special words, but all special words are not palindromes.
Write a program to accept a word check and print whether the word is a palindrome or only
special word.

Comments of Examiners
Suggestions for teachers
6. Most candidates assigned a value given in the
example instead of accepting it from the user. Other  Advise students to read the question
mistakes were: carefully.
(i) Initial and final values of the loop were wrong.  Index value of the string starts from
(ii) Instead of applying proper logic to reverse a zero is an important point that must
word the library function reverse (). be explained with examples.
(iii) Extraction of the first and the last character of the  All commonly used functions must
string was incorrect. be taught using examples.
(iv) Candidates wrote the program for a palindrome  The difference between String
number. reverse and number reverse must be
taught.

250

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 6.
import java .util.*;
class ques6
{
public static void main (String s[])//throws IOException
{
Scanner obj = new Scanner(System.in);
System.out.println(" enter a word ");
String word = obj.nextLine();
String rword="";
int l,x;
l= word.length();
for(x=l-1;x>=0;x--)
rword = rword+ word.charAt(x);
if(word.equals(rword))
System.out.println( word +" is palindrome");
else
if(word.charAt(0) == word.charAt(l-1))
System.out.println( word +"is a special word");
}
}
Variable description/Mnemonic codes

Question 7.

Design a class to overload a function SumSeries() as follows : [15]


(i) void SumSeries(int n, double x) – with one integer argument and one double argument
to find and display the sum of the series given below :
𝑥𝑥 𝑥𝑥 𝑥𝑥 𝑥𝑥 𝑥𝑥
s = − + − + … … … to n terms
1 2 3 4 5
(ii) void SumSeries() – To find and display the sum of the following series :
s = 1 + (1 × 2) + (1 × 2 × 3)+. … … … + (1 × 2 × 3 × 4 … … … … … × 20)

251

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Comments of Examiners
7. Most candidates answered this question correctly,
however a few common mistakes were observed: Suggestions for teachers
(i) Function overloading concept was not followed  Function overloading concept should
instead, two separate programs were written. be taught clearly.
(ii) Use double instead of void as return type of the  Use of double data type and its
function. initialization must be taught
(iii) Candidates accepted the values from the user  Program on function overloading
with in the function instead of accepting them as covering all logics must be done in
parameters. class.
(iv) Declaration and initialization of variable ‘s’
which is used to accumulate the value of the
series was not done properly.
(v) In the first part of the question, extraction and accumulation of negative and positive terms was
not done properly. In the second part of the question finding the factorial and accumulation of it
was also not done properly.

MARKING SCHEME
Question 7.
import java.util.*;
class Q7 {
void SumSeries(int n, double x) {
double sum=0.0d;
int i;
for(i=1;i<=n;i++)
{ if (i%2==0 )
sum=sum-x/(double)i;
else
sum=sum+x/(double)i; }
System.out.println("sum="+sum); }
void SumSeries() {
int s=0, p=1;
for(int i=1;i<=20;i++) {
p=p*i;
s=s+p; }
System.out.println("sum="+s); }
public static void main(String args[]) {
Q7 obj=new Q7();
obj.SumSeries(5,2.0);
obj.SumSeries();
}}}

252

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 8.
Write a program to accept a number and check and display whether it is a Niven number or [15]
not. (Niven number is that number which is divisible by its sum of digits).
Example :
Consider the number 126.
Sum of its digits is 1+2+6 = 9 and 126 is divisible by 9.

Comments of Examiners
8. Most of the candidates answered this question
Suggestions for teachers
correctly. However, few common mistakes were
observed:  Instruct students to read the question
(i) Duplicate value of the accepted number was not carefully.
done by most of the candidates.  The program should be done
(ii) Extraction of digits was not done in a proper way. carefully and importance of having a
(iii) Loop control variable was not updated (num = duplicate copy of a number should be
num/10) explained to the students.
(iv) Variable sum to add all digits of the number was  Guide students to extract digits from
not initialized. numbers with examples.
(v) Candidates checked whether the sum is divisible  Difference between / and % should
by num, instead of checking whether num is be explained clearly.
divisible by sum.

MARKING SCHEME
Question 8.
import java.util.*;
class Niven
{ public static void main(String args[]) {
Scanner sc =new Scanner(System.in);
System.out.println("enter number");
int num=sc.nextInt( );
int n=num;
int rem;
int sum=0;
while(num>0)
{ rem=num%10;
sum=sum+rem;
num=num/10; }
if(n%sum==0)
System.out.println("Niven number");
else
System.out.println("not Niven Number");
} }

253

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 9.
Write a program to initialize the seven Wonders of the World along with their locations in [15]
two different arrays. Search for a name of the country input by the user. If found, display the
name of the country along with its Wonder, otherwise display “Sorry Not Found!”.
Seven wonders - CHICHEN ITZA, CHRIST THE REDEEMER, TAJMAHAL, GREAT
WALL OF CHINA, MACHU PICCHU, PETRA, COLOSSEUM
Locations - MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY
Example - Country Name : INDIA Output : INDIA - TAJMAHAL
Country Name : USA Output : Sorry Not Found!

Comments of Examiners
9. Common errors found were: Suggestions for teachers
(i) Syntax error in declaring and initializing of
arrays.  Solve number of problems on arrays
(ii) Double quotes were not used for any string having various data types.
values.  Syntax for creation of an array as
(iii) Country name to be searched was not accepted well assigning values and accepting
from the user. input values in an array need to be
(iv) Incorrect limits of loop practiced with different examples.
For (int i=1; i<=7;i++)
(v) outputting of messages were incorrectly placed.

254

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 9.

import java.util.*;
class wonders
{
public static void main(String args[])

{
String w[]={"CHICHEN ITZA","CHRIST THE REDEEMER", "TAJMAHAL", "GREATWALL
OF CHINA","MACHU PICCHU","PETRA","COLOSSEUM"};
String l[]={"MEXICO","BRAZIL","INDIA","CHINA","PERU","JORDAN","ITALY"};
String s;int i,len;
Scanner br=new Scanner(System.in);
System.out.println("Enter the name of the country to be searched for " );
s=br.nextLine();
len=w.length; // OR len = l.length;
boolean flag=false;
for (i=0;i<len;i++) // OR for( i=0;i<7;i++)
{
if(s.equalsIgnoreCase(l[i]))
{
System.out.println(l[i]+" - "+ w[i]);
flag =true; break;
}
}
if(flag== false)

System.out.println("Sorry Not Found");


}
}

OR

class Wonders
{
String w[]={"CHICHEN ITZA", "CHRIST THE REDEEMER", "TAJMAHAL", "GREATWALL
OF CHINA", "MACHU PICCHU", "PETRA", "COLOSSEUM"};
String L[]={"MEXICO","BRAZIL","INDIA","CHINA" ,"PERU","JORDAN","ITALY"};
String s;
Wonders(String x)
{
s = x;
}
public void search ( )
{

255

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


int i,l = w.length ; //or L.length;
for ( i =0;i<l;i++)
{
if (s.equalsIgnoreCase(L[i]))
{
System.out.println(L[i] + " - " +w[i]);
System.exit(0);
}
}
System.out.println("Sorry Not Found");
}
}

256

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Topics /Concepts found difficult
- Conversion of if() to ternary operator
- Parametrized constructor
- Typecasting
- Finding, how many number of times body of the loop gets executed
- Types of errors
- Nested loop
- String functions
- Series Programs
- Function overloading

Suggestions for Students: -

- Attempt all questions in Section A


- Read the question carefully before answering.
- Practice programs on the Computer.
- A good variable description containing a list of important variables used in the program along with
their data types and purpose must be given at the end of every program.
- Project work should be done independently to reinforce all concepts
- Do not write meaningless words like SOP, SOPLN, PSVM etc. for System.out.print,
System.out.println, public static void main

257

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


ICSE - 2015

ICSE EXAMINATION 2015

Council for the Indian School Certificate Examinations


ICSE - 2015
Pragati House, 3rd Floor, 47- 48, Nehru Place
New Delhi - 110 505

November 2015
FOREWORD

This document of the Analysis of Pupil Performance at the ICSE (Class-10) Examination is a unique tool for
retrospection for both, teachers and students. It has grown and evolved over the years to provide feedback to all
concerned in terms of the strengths and weaknesses of the candidates in handling the ICSE examinations.

We commend the work of Mr. Lancelot J Fuller, Deputy Secretary, and the ICSE Division of the Council who
have painstakingly prepared this analysis. We are grateful to the examiners who have contributed through their
comments on the performance of the candidates under examination as well as for their suggestions to teachers
and students for the effective transaction of the syllabus.

We hope the schools will find this document useful in more ways than one. We invite comments from schools
on further improving its utility and quality.

Gerry Arathoon
November 2015 Chief Executive & Secretary

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


INTRODUCTION

The Council for the Indian School Certificate Examinations has published the “Analysis of Pupil Performance”
annually since 1994. This document is reviewed every year and changes are incorporated based on suggestions
received from various quarters which include experts in the field of education, Heads of Schools and teachers, in
order to make the analysis more useful and meaningful.

This document comprises both, a quantitative as well as a qualitative analysis of the performance of pupils at the
ICSE examinations. The Analysis of Pupil Performance has been carried out for the most studied subjects that
are largely ascribed to, by the schools. The purpose of this document is to give teachers and students a macro
view of the overall performance of all candidates who have taken the examination and examiners’ comments on
each question. It is hoped that this would enable teachers and students to understand the assessment of the ICSE
examinations better and help both, teachers and students, in the teaching – learning process, more effectively.

The qualitative analysis seeks to provide a transparent look at the assessment process in order to enhance the
effectiveness of the entire assessment procedure. Once the process of the evaluation of scripts is over, examiners
are requested to contribute detailed comments on the performance of candidates for each question. The
comments include the examiners’ response on what constitutes a good answer; common errors made by
candidates while answering the questions; the questions that appeal to students and the overall performance by
the students.

The quantitative analysis is based on the overall performance of all the students who took the examination. An
analysis of the percentage of students who obtained marks in different mark ranges is also included.

Mr. Richard Ellis, Mr. M.R. Felix, Mr. M. Gopal, Mr. C.M. Thomas, Mrs. Liza George, Mrs. Namita Bajaj,
Mrs. Desiree Tennent and Ms. Mansi Guleria are to be commended for their meticulous and diligent effort in
preparing this reference tool for both, teachers and students.

Lancelot J Fuller
November 2015 Deputy Secretary

iii

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

STATISTICS AT A GLANCE

Total Number of students who took the examination 94,250


Highest Marks Obtained 100
Lowest Marks Obtained 8
Mean Marks Obtained 83.97

Percentage of Candidates according to marks obtained

Mark Range
Details
0-20 21-40 41-60 61-80 81-100
Number of Candidates 3 54 7,469 27,146 59,578
Percentage of Candidates 0.00 0.06 7.92 28.80 63.21
Cumulative Number 3 57 7,526 34,672 94,250
Cumulative Percentage 0.00 0.06 7.99 36.79 100.00

Range of Marks Obtained

70.00 63.21
Percentage of Candidates

60.00

50.00

40.00
28.80
30.00

20.00
7.92
10.00
0.00 0.06

0.00
0-20 21-40 41-60 61-80 81-100

Marks Obtained

227

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

ANALYSIS OF PERFORMANCE
Question 1

(a) What are the default values of primitive data type int and float? [2]

(b) Name any two OOP’s principles. [2]

(c) What are identifiers? [2]

(d) Identify the literals listed below:


(i) 0.5 (ii) 'A' (iii) false (iv) "a". [2]

(e) Name the wrapper classes of char type and boolean type. [2]

Examiners’ Comments
(a) Most candidates answered correctly.
However a few were not clear about the Suggestions for teachers
default value of float.  Primitive data types should be taught
(b) Most candidates answered correctly. However with its default values.
some candidates got confused with the  Principles and features of OOP’s
principles of OOP’s. should be explained clearly.
(c) Most candidates answered correctly. A few  Correct definitions of terms used
candidates however wrote the rules for frequently should be explained
declaring an identifier. thoroughly.
(d) Though most candidates answered correctly,  Explain the different types of literals
there were some who misunderstood the with examples.
question and wrote vague and incorrect  Teach all the wrapper classes with the
answers. correct syntax.
(e) Most candidates wrote the first character of
wrapper classes in lower case letters instead of uppercase character.

MARKING SCHEME
Question – 1
(a) The default value of int is 0 and that of float is 0.0f
(b) Data Abstraction/Abstraction, Inheritance, Polymorphism, Message passing, Data
encapsulation/Encapsulation
(c) An identifier is a sequence of characters used to name variables , methods, classes,
packages and interfaces OR
They represent names of different components of a Java program.
(d) (i) floating point literal
(ii) character literal..
(iii) boolean literal.
(iv) String literal
(e) Character and Boolean

228

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 2
(a) Evaluate the value of n if value of p=5,q=19
int n = (q-p)>(p-q)?(q-p) : (p-q); [2]

(b) Arrange the following primitive data types in an ascending order of their size: [2]
(i) char (ii) byte (iii) double (iv) int

(c) What is the value stored in variable res given below : [2]
double res = Math.pow("345".indexOf('5'),3);

(d) Name the two types of constructors. [2]

(e) What are the values of a and b after the following function is executed , if the values
passed are 30 and 50:
void paws(int a ,int b)
{ a=a+b;
b=a-b;
a=a-b;
System .out.println(a+","+b); } [2]

Examiners’ Comments:
(a) Most candidates answered correctly, however
Suggestions for teachers
some candidates wrote the expression (q-p) instead
 Practice exercise on ternary operator.
of its final value.
(b) Candidates got confused between the size of int  Order of all data types with its size
and char. Some candidates wrote the answer in should be taught thoroughly.
descending order instead of an ascending order.  Stress on using important keywords.
(c) Most candidates wrote the answer as 8 instead 8.0.  Practice exercises on evaluation of the
A few candidates were unable to find the index of multiple and single mathematical
the given argument. functions on the computer.
(d) Most candidates answered correctly. A few  Constructor should be taught in detail
candidates were not clear about the types of along with its types.
constructor.  Explain the difference between transfer
(e) Most candidates answered correctly. Some of value and interchange of value.
however were unable to interchange the value
correctly.

229

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question - 2
(a) n=14
(b) (i) byte (ii) char (iii) int (iv) double.
(c) 8.0
(d) (i) Non-Parameterized constructor and Parameterized constructor. [OR]
(ii) Default constructor and Parameterized constructor. [OR]
(iii) Constructor without parameters and Constructor with parameters.
(e) 50,30

Question 3
(a) State the data type and value of y after the following is executed :
char x='7';
y= Character.isLetter(x); [2]

(b) What is the function of catch block in exception handling ? Where does it appear in
a program? [2]

(c) State the output when the following program segment is executed :
String a="Smartphone", b="Graphic Art";
String h=a.substring(2,5);
String k= b.substring(8).toUpperCase();
System.out.println(h);
System.out.println(k.equalsIgnoreCase(h)) ; [2]

(d) The access specifier that gives the most accessibility is____________________ and the
least accessibility is __________________. [2]

(e) (i) Name the mathematical function which is used to find sine of an angle given
in radians.
(ii) Name a string function which removes the blank spaces provided in the prefix
and suffix of a string . [2]

(f) (i) What will this code print ?


int arr[] =new int[5];
System.out.println(arr);
(i) 0 (ii) value stored in arr[0] (iii) 0000 (iv) garbage value
(ii) Name the keyword which is used to resolve the conflict between method parameter
and instance variables/fields. [2]

(g) State the package that contains the class :


(i) BufferedReader
(ii) Scanner [2]

230

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(h) Write the output of the following program code :
char ch;
int x=97;
do
{
ch=(char)x;
System.out.print(ch+" ");
if(x%10==0)
break;
++x;
} while(x<=100); [2]

(i) Write the Java expression for:


a2 + b2
2ab [2]

(j) If int y=10 then find int z=(++y*(y++ +5)); [2]

Examiners’ Comments
(a) Many candidates did not write the data type with
Suggestions for teachers
only the value being written. Some candidates
were unfamiliar with Character functions.  All the character functions given in the
(b) Most candidates showed a lack of knowledge of Syllabus should be taught
this topic. However a few candidates wrote the comprehensively.
answer correctly.  Teach all the String functions
(c) Many candidates answered this question mentioned in the syllabus thoroughly.
correctly. However some candidates incorrectly  Access specifiers should be taught with
wrote (Art) instead of art. examples.
(d) Most candidates answered correctly. However,  Emphasize on all mathematical and
there were few candidates who interchanged the String Functions.
answer. Some candidates wrote protected, friendly  Attach more importance to the
and default as the answer instead of private. fundamentals of array.
(e) Most candidates answered this question  Introduce the concept of packages and
correctly. A few however committed errors in the the classes contained in them.
syntax and wrote the answer as sine () instead of  Practice output questions involving
sin (). loops and stress on doing dry run and
(f) Most candidates were unable to understand both writing the steps of calculation.
parts of the question and wrote incorrect answers.  Explain the hierarchy of operators and
(g) Many candidates answered this question correctly. also how to evaluate the Java
A few candidates were not familiar with the expressions.
package that contains Scanner and Buffered class.  Prefix and postfix of increment and
(h) A number of candidates wrote the answer correctly, decrement operator is a common topic
but a few candidates failed to take the last iteration. and sufficient practice must be done in
Some candidates wrote the integer value instead of class.
character value.

231

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(i) Most candidates answered correctly. A few however lost marks due to missing
asterisk(multiplication) symbols and wrong division signs.
(j) Some candidates were not familiar in solving expressions involving pre increment and post
increment operators within a multiple parenthesis.

MARKING SCHEME
Question - 3
(a) Data type is boolean and y=false
(b) A Catch block is a group of Java statements that are used to handle a raised exception. The catch
block should be placed after try block.
(c) art
true
(d) (i) public (ii) private.
(e) (i)sin() (ii) trim()
(f) (i) garbage value
(ii) this keyword.
(g) io and util package
(h) a b c d
(i) (Math.pow(a,2)+Math.pow(b,2))/(2*a*b) [OR]
(a*a+b*b)/(2*a*b)
(j) int z=(++y*(y++ +5));
(11*(11+5));
176

Question 4
Define a class called Parking Lot with the following description :
Instance variables/data members :
int vno - To store the vehicle number
int hours - To store the number of hours the vehicle is parked in the parking lot
double bill - To store the bill amount

Member methods :
void input() - To input and store the vno and hours.
void calculate() - To compute the parking charge at the rate of 3 for the first hour or part thereof,
and 1.50 for each additional hour or part thereof.
void display() - To display the detail

Write a main method to create an object of the class and call the above methods.
[15]

232

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments
(i) Function names and variables names written by Suggestions for teachers
most candidates were different from what was  Instruct students to use the class name,
asked in the question. variable name and method name as
(ii) The entire program was done using only one given in the question.
method.
 Teach the concept of
(iii) The value for parking charge, which is to be
classes/object/Data members with the
calculated was accepted from the user.
help of real Life examples.
(iv) There were mistakes in calculations of parking
 Teach writing programs in which
charge.
multiple methods are involved.
(v) Variables were declared inside the input() method .
(vi) Object creation was not done.  Explain that the parking charge/bill that
(vii) Variable description /mnemonic codes were not needs to be calculated should not be
found in most answers. accepted from the user.

MARKING SCHEME
Question - 4
import java.util.*;
class ParkingLot
{
int vno;
int hours;
double bill;
Scanner sc=new Scanner(System.in);
void input()
{
System.out.println("Enter the vehicle number and number of hours");
vno=sc.nextInt();
hours=sc.nextInt();
}
void calculate()
{
if(hours<=1)
bill= 3;
else
bill=3+(hours-1)*1.50;
}
void display()
{
System.out.println("Vechicle Number:"+vno);
System.out.println("Hours:"+hours);
System.out.println("Bill:"+bill);
}
public static void main(String args[])
{
ParkingLot pl=new ParkingLot();
233

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


pl.input();
pl.calculate();
pl.display();
}
}

Description of variables/ comments/mnemonics

Question 5

Write two separate programs to generate the following patterns using iteration(loop) statements:
* (b) 54321
*# 5432
*#* 543
*#*# 54
*#*#* 5 15]

Examiners’ Comments:
Suggestions for teachers
(i) Some candidates wrote the program for only one
type of triangle instead of both.  Emphasize the difference between
(ii) A few candidates were confused with the print() and println() method.
pattern using two characters.  Students should be made to practice and
(iii) In part (b) reverse loop was not formed execute programs to print patterns on
correctly the computer.
(iv) A few candidates answered this question by  Assign program segments to students
writing 5 print statements. to find the output so that they will be
(v) Improper output, println() statement instead of able to perform the manual calculation
print() statement for printing each character. and understand how the loop works.
(vi) Blank println() statement was missing.  Instruct students to dry run the program

MARKING SCHEME
Question - 5
(a) import java.io.*;
class Quest_5a
{
void patteren1()
{ for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{ if(j%2!=0)
System.out.print("*"+" ");
else
System.out.print("#"+" ");
}
234

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


System.out.println();
} } }

Description of variables/ comments/mnemonics


(b) import java.util.*;
class Quest_5b
{
void patteren()
{
for(int i=1;i<=5;i++)
{
for(int j=5;j>=i;j--)
{
System.out.print(j);
}
System.out.println();
}
}
}
Description of variables/ comments/mnemonics

Question 6
Write a program to input and store roll numbers, names and marks in 3 subjects of n
number students in five single dimensional array and display the remark based on
average marks as given below:(the maximum marks in the subject are 100)
average marks=Total Marks
3
Average marks Remarks
85-100 EXCELLENT
75-84 DISTINCTION
60-74 FIRST CLASS
40-59 PASS
Less than 40 POOR [15]
Examiners’ comments:
(i) Many candidates attempted the question without
Suggestions for teachers
using array.
(ii) Input of data was not taken inside the loop.  Array creation with different data types
(iii) Value of ‘n’ (number of students) not accepted. should be practiced.
(iv) Arrays were declared without specifying the  Inputting and storing elements in an
size. array should be practiced on the
(v) Calculation average was not done inside the loop. computer.
(vi) Accepted the average marks from the user  Use of relational operators should be
instead of computing. explained clearly.
(vii) Conditions for grading were not written correctly.

235

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question - 6
import java.util.*;
class Quest_6
{
void grade()
{
Scanner br=new Scanner(System.in);
System.out.println("Enter number of students");
int n=br.nextInt();
int roll[]=new int[n];
String name[]=new String[n];
double m1[]=new double[n];
double m2[]=new double[n];
double m3[]=new double[n];
double avg[]=new double[n];
for(int i=0;i<n;i++)
{
System.out.println("Enter roll number,name,marks in 3 Subjects
for"+(i+1)+"student");
roll[i]=br.nextInt();
name[i]=br.next();
m1[i]=br.nextDouble();
m2[i]=br.nextDouble();
m3[i]=br.nextDouble();
avg[i]=(m1[i]+m2[i]+m3[i])/3;
if(avg[i]>=85&&avg[i]<=100)
System.out.println("EXCELLENT");
else if(avg[i]>=75&&avg[i]<=84)
System.out.println("DISTINCTION");
else if(avg[i]>=60&&avg[i]<=74)
System.out.println("FIRST CLASS");
else if(avg[i]>=40&&avg[i]<=59)
System.out.println("PASS");
else
System.out.println("POOR");
}
}
}

Description of variables/ comments/mnemonics

236

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 7
Design a class to overload a function Joystring() as follows:
(i) void Joystring (String s, char ch1, char ch2) with one string argument and two character
arguments that replaces the character argument ch1 with the character argument ch2 in
the given string s and prints the new string.
Example:
Input value of s ="TECHNALAGY"
ch1='A',
ch2='O'
Output : "TECHNOLOGY"
(ii) void Joystring (String s) with one string argument that prints the position of the first
space and the last space of the given string s.
Example:
Input value of ="Cloud computing means Internet based computing"
Output : First index : 5
Last index : 36
(iii) void Joystring ( String s1, String s2 ) with two string arguments that combines the
two strings with a space between them and prints the resultant string.
Example:
Input value of s1 ="COMMON WEALTH "
Input value of s2="GAMES "
Output : COMMON WEALTH GAMES
(use library functions) 15

237

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments
Most candidates answered correctly. A few Suggestions for teachers
candidates were not clear about the concepts of - Emphasis on the function name to be the
function overloading. same.
(i) A few candidates used separate programs or - Programs using function overloading
three functions with different names. should be practiced more. Using only
(ii) Some candidates used the same name for the main functions for all programs should
class and the three methods. be avoided.
(iii) Some candidates made all the calculations in - String functions and their uses need to
the main function itself. be taught thoroughly.
(vi) Functions were called without passing - Passing arguments through function
required arguments and accepted values as must be worked out while teaching.
inputs inside the function body. - Practice lot of output questions based on
(v) In place of concat() method , + operator was all the String functions.
used. - During the given reading time, minute
(vi) String functions were not used. Instead details should be noted and underlined
candidates complicated the program by using so as not to be missed while writing the
loops and arrays. program.

MARKING SCHEME
Question - 7
import java.util.*;
class Quest_7
{
void joystring(String s,char ch1,char ch2)
{
String str=s.replace(ch1,ch2);
System.out.println(str);
}
void joystring(String s)
{
int first=s.indexOf(' ');
System.out.println("First index :"+first);
int last=s.lastIndexOf(' ');
System.out.println("Last index :"+last);
}
void joystring(String s1,String s2)
{ String s3=" ";
String str=s1.concat(s3).concat(s2);
System.out.println(str);
}
public static void main(String args[])
{
Quest_7 obj=new Quest_7();
obj.joystring("TECHNALAGY",'A','O');
238

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


obj.joystring("Cloud computing means Internet based computing");
obj.joystring("COMMOM WEALTH","GAMES");
}
}
Description of variables/ comments/mnemonics

Question 8
Write a program to input twenty names in an array. Arrange these names in descending order
of alphabets, using the bubble sort technique. [15]
Examiners’ comments
(i) Array elements are assigned not accepted. Suggestions for teachers
(ii) Integer array was declared instead of String  Revise iteration before teaching arrays.
array.  Explain the importance of the loop
(iii) Declaration of temporary variable as an integer variable.
type instead of String array.  Basic technique such as searching and
(iv) Compare To() method was not used. sorting should be taught with different
(v) Other methods of sorting were used instead of data types.
bubble sort.  Use of compareTo () method should be
(vi) Array elements were sorted in ascending order explained with help of examples.
instead of sorting in a descending order.
 Train candidates to write the program
(vi) Printing of sorted elements was not done.
using different array length.
 Difference between bubble sort and
selection sort must be discussed.
 Emphasize on output requirements.

MARKING SCHEME
Question 8
import java.util.*;
class Quest_8
{ void sort()
{
Scanner br=new Scanner (System.in);
String names[]=new String[20];
System.out.println("Enter 20 names");
for(int i=0;i<20;i++)
{
names[i]=br.next();
}
for(int j=0;j<(20-1);j++)
{ for(int k=0;k<20-j-1;k++)
{
if(names[k].compareTo(names[k+1])<0)
{ String temp=names[k];
239

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


names[k]=names[k+1];
names[k+1]=temp;
}
}
}
System.out.println("Names in descending order");
for(int k=0;k<20;k++)
{System.out.println(names[k]);
}} }
Description of variables/ comments/mnemonics

Question 9

Using the switch statement, write a menu driven program to:


(i) To find and display all the factors of a number input by the user (including 1 and excluding
number itself).
Example:
Sample Input : n =15
Sample Output : 1,3, 5
(ii) To find and display the factorial of a number input by the user (the factorial of a non–
negative integer n, denoted by n!, is the product of all integers less than or equal to n.
Example:
Sample Input : n =5
Sample Output : 5! = 1×2×3×4×5 =120.
For an incorrect choice, an appropriate error message should be displayed. [15]

Examiners’ comments:
Many candidates lost marks because of the absence of
menu and input choice, break and default statement. Suggestions for teachers
Some candidates did not follow the instruction and
wrote two separate programs.  Additional practice on menu driven
programs.
(a) (i) Overlooked the instruction excluding number  Teach all types of logical programs.
itself .  Instruct candidates to read the
(ii) For finding the factor ‘/’ operator was used question carefully and follow the given
instead of % operator. instructions.
(b) (i) Variable for finding the factorial was
initialized with value 0 . Some candidates initialized the variable with value 1 but inside the
loop.
(iii) Loop to find the factorial was formed 1 to < n.

240

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question 9
import java.util.*;
class question9
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);

System.out.println("MENU");
System.out.println("1.FACTORS OF A NUMBER");
System.out.println("2.FACTORIAL OF A NUMBER");
System.out.println("ENTER A NUMBER");
int num=sc.nextInt();
System.out.println("ENTER YOUR CHOICE");
int choice=sc.nextInt();

switch (choice)
{
case 1:
System.out.print("FACTORS ARE=");
for(int i=1;i<=num/2;i++)
{
if(num%i==0)
System.out.print(i+",");
}
break;
case 2:
int f=1;
for(int i=1;i<=num;i++)
{
f=f*i;
}
System.out.println("FACTORIAL OF "+num+"="+f);
break;
default:
System.out.println("Wrong choice");
}
}}

Description of variables/ comments/mnemonics

241

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Topics /Concepts found difficult

 Default value of float.


 Working of ternary operator.
 Wrapper classes.
 Output question using different library functions.
 Default values of primitive data types.
 Evaluation of an expression containing prefix and postfix operators.
 Use of switch...case and default.
 Arranging names in descending order.
 Calculation of bill.
 Use of nested loop.

Suggestions for students

 Solve exercises based on various operators and inbuilt functions.


 Section A is compulsory and hence all question must be attempted.
 Read the question carefully before answering.
 If a proper definition does not come to mind then explain the term with suitable example.
 Do not forget to write comment lines or description of variables and use mnemonic names.
 Dry run each program before trying it on the computer.
 Try to understand the question asked by reading it carefully.
 Each concept should be understood instead of rote learning.
 If a definition does not come to mind, write an accurate example to illustrate the concept.
 Learn the correct use of all statements so that syntax errors can be eliminated.

242

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


ICSE - 2014

ICSE EXAMINATION 2014

Council for the Indian School Certificate Examinations


ICSE - 2014
Pragati House, 3rd Floor, 47- 48, Nehru Place
New Delhi - 110 505

September 2014
For further information and comments, please correspond with:

The Deputy Secretary – ICSE


Council for the Indian School Certificate Examinations
Pragati House, 3rd Floor
47-48, Nehru Place
New Delhi -110 505

Tel : (011) 26411706; 26413820; 26476547; 26285170


Fax : (011) 26234575; 26212051
E-mail : [email protected]

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


AN ANALYSIS OF PUPIL PERFORMANCE
ICSE EXAMINATION 2014

COUNCIL FOR THE INDIAN SCHOOL CERTIFICATE EXAMINATIONS,


NEW DELHI

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


FOREWORD

This document of the Analysis of Pupil Performance at the ICSE (Class-10) Examination is a unique tool for
retrospection for both, teachers and students. It has grown and evolved over the years to provide feedback to all
concerned in terms of the strengths and weaknesses of the candidates in handling the ICSE examinations.

We commend the work of Mr. Lancelot J Fuller, Deputy Secretary, and the ICSE Division of the Council who
have painstakingly prepared this analysis. We are grateful to the examiners who have contributed through their
comments on the performance of the candidates under examination as well as for their suggestions to teachers
and students for the effective transaction of the syllabus.

We hope the schools will find this document useful in more ways than one. We invite comments from schools
on further improving its utility and quality.

Gerry Arathoon
October 2014 Chief Executive & Secretary

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


INTRODUCTION

The Council for the Indian School Certificate Examinations has published the “Analysis of Pupil Performance”
annually since 1994. This document is reviewed every year and changes are incorporated based on suggestions
received from various quarters which include experts in the field of education, Heads of Schools and teachers, in
order to make the analysis more useful and meaningful.

This document comprises both, a quantitative as well as a qualitative analysis of the performance of pupils at the
ICSE examinations. The Analysis of Pupil Performance has been carried out for the most studied subjects that
are largely ascribed to, by the schools. The purpose of this document is to give teachers and students a macro
view of the overall performance of all candidates who have taken the examination and examiners’ comments on
each question. It is hoped that this would enable teachers and students to understand the assessment of the ICSE
examinations better and help both, teachers and students, in the teaching – learning process, more effectively.

The qualitative analysis seeks to provide a transparent look at the assessment process in order to enhance the
effectiveness of the entire assessment procedure. Once the process of the evaluation of scripts is over, examiners
are requested to contribute detailed comments on the performance of candidates for each question. The
comments include the examiners’ response on what constitutes a good answer; common errors made by
candidates while answering the questions; the questions that appeal to students and the overall performance by
the students.

The quantitative analysis is based on the overall performance of all the students who took the examination. An
analysis of the percentage of students who obtained marks in different mark ranges is also included.

Mr. Richard Ellis, Mr. M.R. Felix, Mr. M. Gopal, Mr. C.M. Thomas, Mrs. Liza George and Mrs. Namita Bajaj
are to be commended for their meticulous and diligent effort in preparing this reference tool for both, teachers
and students.

Lancelot J Fuller
October 2014 Deputy Secretary

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS
STATISTICS AT A GLANCE

Total Number of students who took the examination


89,447
Highest Marks Obtained 100
Lowest Marks Obtained 18
Mean Marks Obtained 83.82

Percentage of Candidates according to marks obtained

Mark Range
Details
0-20 21-40 41-60 61-80 81-100
Number of Candidates 2 73 6665 25943 56764
Percentage of Candidates 0.00 0.08 7.45 29.00 63.46
Cumulative Number 2 75 6740 32683 89447
Cumulative Percentage 0.00 0.08 7.54 36.54 100.00

Range of Marks Obtained

70.00 63.46
Percentage of Candidates

60.00

50.00

40.00
29.00
30.00

20.00
7.45
10.00
0.00 0.08

0.00
0-20 21-40 41-60 61-80 81-100

Marks Obtained

226

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


COMPUTER APPLICATIONS

ANALYSIS OF PERFORMANCE
Question 1

(a) Which of the following are valid comments?


(i)/* comment
*/
(ii)/* comment
(iii)//
comment

(iv)*/ comment */ [2]

(b) What is meant by a package? Name any two Java Application Programming Interface
packages. [2]

(c) Name the primitive data type in Java that is:


(i) a 64-bit integer and is used when you need a range of values wider than those
provided by int.
(ii) a single 16-bit Unicode character whose default value is '\u0000’. [2]

(d) State one difference between the floating point literals float and double. [2]
(e) Find the errors in the given program segment and re-write the statements correctly to
assign values to an integer array.
int a = new int(5);
for(int i=0;i<=5;i++) a[i]=i; [2]

227

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments
(a) Most candidates answered correctly. However Suggestions for teachers
a few were not clear about the starting and - The Topic “Comments in Java” should be
ending symbols of multi-line comment. taught and revised thoroughly.
(b) Most candidates answered this question - Students must be trained to write programs
correctly. with comments.
(c) Most candidates answered the first part - The proper definition of the term “package”
correctly while a very few answered the to be explained thoroughly followed by
second part correctly. names of important packages.
(d) Most candidates answered the question - Students must be guided and reminded
correctly. constantly to learn such topics thoroughly as
(e) A few candidates could not identify all the 3 they are examined in the compulsory section
errors while 2 or just 1 of the errors were only.
identified by most candidates. - The “Data Type” topic should be covered
thoroughly under different heads.
- Differences between all types of data types to
be clearly discussed in class.
- Explain with conceptual clarity the Syntax
of declaration of 1-D array and motivate the
students to learn it thoroughly.
- Test expression of the loop to create 1-D array
to be comprehensively explained.

MARKING SCHEME
Question – 1
(a) (i)
(iii)
(b) A package is a group of related classes
Any two of the following:
java.applet java.sql javax.sound
java.awt java.text javax.swing
java.beans java.util javax.transaction
java.io javax.accessibility javax.xml
java.lang javax.crypto org.ietf
java.math javax.imageio org.omg
java.net javax.naming org.w3c
java.nio javax.net org.xml
java.rmi javax.print
java.security javax.rmi
(c) (i) long
(ii) char

228

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(d) The float data type is a single-precision 32-bit (or 4 bytes) OR Default value 0.0f OR 8
digit precision
The double data type is a double-precision 64-bit (or 8 bytes) OR Default value 0.0d OR
16 digit precision
(e) int a[]=new int[5]; OR int []a=new int[5];
(for(int i=0;i<5;i++) OR for(int i=0;i<=4;i++)

Question 2
(a) Operators with higher precedence are evaluated before operators with relatively lower
precedence. Arrange the operators given below in order of higher precedence to lower
precedence.
(i) && (ii) % (iii) >= (iv) ++ [2]
(b) Identify the statements listed below as assignment, increment, method invocation or
object creation statements.
(i) System.out.println("Java");
(ii) costPrice = 457.50;
(iii) Car hybrid = new Car( );
(iv) petrolPrice++; [2]
(c) Give two differences between the switch statement and the if-else statement. [2]
(d) What is an infinite loop? Write an infinite loop statement. [2]
(e) What is a constructor? When is it invoked? [2]

229

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments:
(a) Most candidates who were clear about Suggestions for teachers
precedence of operators wrote the correct  Hierarchy/precedence/order of all types of
answer. operators should be taught thoroughly with
(b) Some candidates appeared confused adequate evaluation exercises based on
between the method invocation (i) and precedence.
object creation (ii).  Assign practice exercises so that students are
(c) Answered correctly by candidates who able to identify different types of statements.
thoroughly studied the theoretical notes on  Provide concise notes covering all possible
if-else and switch-case. questions on if-else and switch-case and
(d) The first part was answered correctly by explain the role of each keyword like else,
most candidates. Examples written default, case, etc.
however were incorrect.  The topic “Variations of loops covering,
(e) The definition of a constructor was multiple initialization expressions, multiple
answered correctly though some update expressions and empty loop should be
candidates did not cover all the points in explained in class with proper examples and
their definition. exercises.
 Invoking of a constructor along with object
creation needs to be explained in detail.

MARKING SCHEME
Question - 2
(a) (iv), (ii), (iii), (i) All 4 correct
Only 1 incorrect
(b) (i) method invocation
(ii) assignment
(iii) object creation
(iv) increment All 4 correct
Only 1 incorrect
(c) switch:
can perform only equality (= =) comparison OR
can have a number of possible execution paths OR
works with the byte/short/char/int primitive data types OR
multiple branching OR
is used along with case statement OR default statement
If-else:
Can perform all relational comparisons (<, >, >=, <=, = =, !=) OR
executes a certain section of code only if a particular test evaluates to true OR
provides a secondary path of execution when an "if" clause evaluates to false OR
works with any data type OR conditional/control flow/decision statements
(d) A sequence of instructions which loops/iterates/repeats endlessly.
Any valid example which shows:
the loop having no terminating condition OR

230

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


having a condition that can never be met OR
one that causes the loop to start over
for(;;) or while(true){}
(e) A constructor is a member function or method of a class that has
the same name as the class OR has no return type not even void.
OR initializes data members of a class.

It is invoked at the time of object creation


Question 3

(a) List the variables from those given below that are composite data types.
(i) static int x; (iv) boolean b;
(ii) arr[i]=10; (v) private char chr;
(iii) obj.display( ); (vi) String str; [2]
(b) State the output of the following program segment:
String str1= "great"; String str2= "minds";
System.out.println(str1.substring(0,2).concat(str2.substring(1)));
System.out.println(("WH"+(str1.substring(2).toUpperCase()))); [2]
(c) What are the final values stored in variables x and y below?
double a = − 6.35;
double b = 14.74;
double x = Math.abs(Math.ceil(a));
double y = Math.rint(Math.max(a,b)); [2]
(d) Rewrite the following program segment using if-else statements instead of the ternary
operator.
String grade=(mark>=90) ? "A" : (mark>=80) ? "B" : "C"; [2]
(e) Give the output of the following method:
public static void main(String[] args){
int a = 5;
a++;
System.out.println(a);
a−=(a−−) – (−−a);
System.out.println(a); } [2]
(f) What is the data type returned by the library functions:
231

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


(i) compareTo()
(ii) equals() [2]
(g) State the value of characteristic and mantissa when the following code is executed.
String s = "4.3756";
int n = s.indexOf('.');
int characteristic=Integer.parseInt(s.substring(0,n));
int mantissa=Integer.valueOf(s.substring(n+1)); [2]
(h) Study the method and answer the given questions.
public void sampleMethod()
{ for(int i=0;i<3;i++)
{ for(int j=0;j<2;j++)
{int number = (int)(Math.random() * 10);
System.out.println(number); }}}
(i) How many times does the loop execute?
(ii) What is the range of possible values stored in the variable number? [2]

(i) Consider the following class:


public class myClass {
public static int x=3, y=4;
public int a=2, b = 3; }
(i) Name the variables for which each object of the class will have its own distinct
copy.
(ii) Name the variables that are common to all objects of the class. [2]
(j) What will be the output when the following code segments are executed?
(i) String s="1001";
int x=Integer.valueOf(s);
double y=Double.valueOf(s);
System.out.println("x="+x);
System.out.println("y="+y);
(ii) System.out.println("The king said \"Begin at the beginning!\" to me."); [2]

232

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments
Suggestions for teachers
(a) Some candidates wrote all three options
 Explain the difference between primitive
correctly but most could identify one or two
and composite data types and give
options correctly.
numerous examples to identify variables of
(b) A few candidates who were clear about
each type.
string functions wrote the correct answer.
(c) Some candidates were confused regarding  Practice questions on multiple string
the sign (+ or -) in the answer and whether functions must be given in class regularly.
the answer should be of double type or int.  Practice exercises on evaluation of the
(d) Most candidates answered correctly. Some multiple and single mathematical functions
candidates, however, printed the grades must be given in class and students should
instead of assigning them. be guided to revise and practice the same
(e) Some candidates were not clear about exercises for the exams.
evaluation of arithmetic assignment  Practice questions on conversion of nested
operators after increment/decrement ternary operator expressions to if else and
operators. visa versa must be given in class.
(f) A few candidates wrote literals as answers as  Order of evaluation of expressions using
they failed to read the question carefully and arithmetic assignment operators and
not the data types as asked. Some candidates increment/decrement operators must be
were not clear about the data type int and clearly explained in class along with
wrote the full word integer. examples.
(g) Most candidates who had conceptual clarity  When teaching string functions proper
of multiple functions wrote the correct syntax of each function prototype (return
answer. type and type and number of parameters)
(h) Some candidates were not clear about should be explained and students should be
random ( ) function and some appeared made to note them in their registers.
confused about nested loop. Students should also be advised to read the
(i) Most candidates lacked the concepts based questions carefully at least twice before
on static and instance variables. answering them.
(j) Some candidates were unaware of value Of  Functions form a very important part of the
( ) function to convert strings to primitive Java language hence a thorough
data types besides parsing. The role of explanation and additional practice
escape sequences in outputs were not clear questions on functions must be given.
to some candidates.  All library functions including random( )
must be tried as output questions, working
practically on the computer along with
evaluation exercises theoretically. Nested
loop concept – outer loop takes the next
iteration only when the entire inner loop
goes through all its iterations once – should
be explained with additional nested loop
examples.

233

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Suggestions for teachers
 The keyword “static” and its use must be
explained with examples.
 ValueOf( ) function as a substitute for
parsing strings to primitive types must be
taught with examples. Escape sequences
and their use along with the list of
important escape sequences must be
taught in class.

MARKING SCHEME
Question - 3
(a) (ii) arr (iii) obj (vi) str All 3 correct
Any 2 correct
(b) grinds
WHEAT
( c) 6.0
15.0
(d) if(mark>=90) grade=”A”;
else if(mark>=80) grade=”B”;
else grade=”C”; All 3 correct
Any 2 correct
(e) 6
6−(6−4)=4
(f) (i) int
(ii) boolean
(g) 4
3756
(h) (i) 6 times
(ii) 0 to 9 OR {1,2,3,4,5,6,7,8,9}
(i) (i) a,b
(ii) x,y
(j) (i) x=1001
y=1001.0
(ii) The king said “Begin at the beginning!”to me.nextLine()

234

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Question 4
Define a class named movieMagic with the following description:
Instance variables/data members:
int year - to store the year of release of a movie
String title - to store the title of the movie
float rating - to store the popularity rating of the movie
(minimum rating=0.0 and maximum rating=5.0)
Member methods:
(i) movieMagic() Default constructor to initialize numeric data members to 0 and
String data member to "".
(ii) void accept() To input and store year, title and rating.
(iii) void display() To display the title of a movie and a message based on the rating as per the
table below.
Rating Message to be displayed
0.0 to 2.0 Flop
2.1 to 3.4 Semi-hit
3.5 to 4.5 Hit
4.6 to 5.0 Super Hit

Write a main method to create an object of the class and call the above member methods. [15]

235

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ Comments
(i) The Class name written by most candidates Suggestions for teachers
was different from the one asked in the  Guide and advise students to carefully
question. read the question and understand its
(ii) Constructor syntax was incorrect (void used, requirements.
variables declared inside constructor and  Constructor syntax to be explained
initialized). comprehensively with additional revision
(iii) if-else range> and < placed incorrectly. and practice on writing constructors.
(iv) There was confusion between  Guide and instruct students to practice to
mathematical symbols ≤ , ≥ and Java relational convert English statements having
operators <=, >=. conditions with ranges to Java if-else using
(v) Multiple functions were not written as asked. proper relational operators.
(vi) There was confusion between global and local  Advise students in home exams against
variables. using ≤, ≥ instead of <=, >=.
 Programs on multiple functions of all types
to be revised on a consistent basis in class.
 Difference between global and local
variables and how to use them in multiple
function programs should be explained
thoroughly in class.

MARKING SCHEME
Question - 4
import java.io.*;//import java.util.*;
public class movieMagic
{
int year; float rating; String title;

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));


//Scanner sc=new Scanner(System.in);

public movieMagic()
{
year=0;
rating=0.0f;
title="";
}

public void accept()throws IOException//throws InputMismatchException


{
System.out.println("Enter year of release");
year=Integer.parseInt(br.readLine()); // sc.nextInt();
System.out.println("Enter title");
236

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


title=br.readLine(); // sc.next();

do
{
System.out.println("Enter rating (minimum 0.0 and maximum 5.0)");
rating=Float.parseFloat(br.readLine()); // sc.nextInt();
}
while (!(rating>=0.0f && rating<=5.0.f)); OR while (rating < 0.0f  rating
>5.0f );
}

public void display()


{
System.out.print("Title:"+title+" Rating: ");
if (rating <=2.0) System.out.println("Flop");

else if (rating<=3.4) System.out.println("Semi


Hit");

else if (rating<=4.5) System.out.println("Hit");

else System.out.println("Super Hit");


}

public static void main()throws IOException


{
movieMagic object = new movieMagic();

object.accept();
object.display();
}

Step
Declaration of class and instance variables
Creating object of class BufferedReader/Scanner
Constructor properly declared and data members initialised
accept() method declaration (with exception handling if
required)
3 Inputs correct
Output title in display() method
Decision for rating<=2.0 and output
237

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Decision for rating<=3.4 and output
Decision for rating<=4.5 and output
Decision for rating>4.5 and output
main method declaration
Creation of object
2 methods called correctly
Description of variables/ comments/ mnemonics

Question 5

A special two-digit number is such that when the sum of its digits is added to the product of its
digits, the result is equal to the original two-digit number.
Example: Consider the number 59.
Sum of digits = 5 + 9 = 14
Product of its digits = 5 × 9 = 45
Sum of the sum of digits and product of digits = 14 + 45 = 59
Write a program to accept a two-digit number. Add the sum of its digits to the product of its
digits. If the value is equal to the number input, output the message “Special 2-digit number”
otherwise, output the message “Not a special 2-digit number”. [15]

Examiners’ Comments:
Most candidates answered this question, but the Suggestions for teachers
- How to validate data should be taught
following errors were commonly observed:
with the help of examples.
(i) Checking for 2-digit number was missing.
- Extraction of digits logic n%=10 and
(ii) Extraction of digits using loop was not clear. n/=10 needs to be explained with
(iii) Candidates were confused in the use of numerous examples and exercises.
temporary variable for copying the original value - Why a copy of original value must be
in extraction of digits. maintained should be explained with a dry
run and which one to use where – if the
original is used in extraction loop then a
copy to be used in comparison or vice
versa.

238

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


MARKING SCHEME
Question - 5
public class special
{
public void sampleMethod(int num)
{
int digit, sumDigit=0, prodDigit=1,
sum=0;
int n=num;
if(num>=10 && num<=99)
{ while(n>0)
{ digit=n%10;
sumDigit+=digit;
prodDigit*=digit;
n/=10;
}
sum+=sumDigit+prodDigit;
if(sum==num)
System.out.println("Special
number");
else
System.out.println("Not a special number");
}
}
}

Step
Input number
Initialise 2 sums and product
Store number in second variable
Check if number is 2-digit
condition for number >0 while(n>0)
Extract digit from number
Compute sum of digits
Compute product of digits
number/=10
Compute total of sum and product of digits
Check if total equals number
Output "Special Number" message
Output "Not Special Number" message
Description of variables/ comments/ mnemonics

239

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


OR

public class alternateSpecial


{
public void sampleMethod(String s)
{
int len,digit1, digit2, sumDigit, prodDigit, sum; String s1, s2;
int n=Integer.parseInt(s);
len=s.length();
if (len==2) // if(n>=10 && n<=99)
{
s1=s.substring(0,1);
s2=s.substring(1,2);

digit1=Integer.parseInt(s1);
digit2=Integer.parseInt(s2);

sumDigit=digit1+digit2;
prodDigit=digit1*digit2;

sum=sumDigit+prodDigit;

if(sum==n)
System.out.println("Special Number");
else
System.out.println("Not a Special Number");
}

}
}

Step
Input number as String
Convert String to integer
Check if number is 2-digit
Extract first digit
Extract second digit
Convert first digit from String to integer
Convert second digit from String to integer
Compute sum of digits
Compute product of digits
Compute total of sum and product of digits
Check if total equals number
Output "Special Number" message
240

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Output "Not Special Number" message
Description of variables/ comments/ mnemonics

Question 6
Write a program to assign a full path and file name as given below. Using library functions, extract and
output the file path, file name and file extension separately as shown.
Input C:\Users\admin\Pictures\flower.jpg
Output Path: C:\Users\admin\Pictures\
File name: flower
Extension: jpg [15]

Examiners’ comments: Suggestions for teachers


A direct question on strings but only a few candidates - Students need to be guided and instructed
whose concepts were clear about string function on how to read each question at least
“substring” answered it correctly. A few candidates twice especially programming questions.
confused this question to be of “files”. The function “substring” is an important
and useful function as it makes any logic
of string program very simple, short and
easy. Hence, this function should be
taught and explained in detail with
examples and programs using substring
in class.
MARKING SCHEME
Question - 6
public class stringHandling
{
public void sampleMethod()
{
String s="C:\\users\\admin\\pictures\\flower.jpg";
int len,i, pos=0; char c; String fpath="", fname="", fextn="";
len=s.length();
for(i=len-1;i>=0;i--)
{
c=s.charAt(i);
if(c=='.')
{ fextn=s.substring(i+1);
pos=i;
}
if(c=='\\')
{ fname=s.substring(i+1,pos);

241

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


fpath =
s.substring(0,i+1);
break;
}
}
System.out.println("Path: "+fpath);
System.out.println("File name: "+fname);
System.out.println("Extension: "+fextn);
}
}

Step
Assign value to String (accept single slash instead of double slash)
Declare variables (ignore initialisation)
Find length of string
Loop
Extract character
Check if character is '.'
Extract substring for file extension
store position of '.'
Check if character is '//' (accept single slash instead of double slash)
Extract substring for file name
Extract substring for file path
break to exit loop
Output file path, file name, file extension
Description of variables/ comments/ mnemonics

OR
public class alternateSolution

{
public void sampleMethod()

{ String s="C:\\users\\admin\\pictures\\flower.jpg";

int pos1=0, pos2=0; String fpath="", fname="", fextn="";

pos1=s.lastIndexOf('\\');

pos2=s.indexOf('.');

fpath=s.substring(0,pos1+1);

fname=s.substring(pos1+1, pos2);
242

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


fextn=s.substring(pos2+1);

System.out.println("Path: "+fpath);

System.out.println("File name: "+fname);

System.out.println("Extension: "+fextn);
}
}

Step
Assign value to String (accept single slash instead of double slash)
Declare variables (ignore initialisation)
Find last index of slash (accept single slash instead of double slash)
Find index of '.'
Extract substring for file path
Extract substring for file name
Extract substring for file extension
Output file path
Output file name
Output file extension
Description of variables/ comments/ mnemonics

Question 7
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:
area = s ( s  a)(s  b)(s  c)
abc
where s =
2
(ii) double area(int a, int b, int height) with three integer arguments, returns the area of a
trapezium using the formula:
1
area = height(a+b)
2
(iii) double area(double diagonal1, double diagonal2) with two double arguments, returns the
area of a rhombus using the formula:

243

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


1
area = (diagonal1×diagonal2) [15]
2
Examiners’ Comments
(i) Most candidates appeared confused in the Suggestions for teachers
return type syntax – both avoid and double - Function prototype syntax with overloading
used together. If void used then instead of to be discussed thoroughly.
System.out.println( ) return used and if double - At least 10 – 12 programs on function
used then no return but System.out. println( ) overloading covering all logics must be
used. done in class and ensure that all students
(ii) Mathematical expressions conversion to Java have these programs in their registers for the
abc purpose of revision during exams.
expressions incorrect - . - Students should be made to practice to
2
convert mathematical formulae to Java
Expression.

MARKING SCHEME
Question - 7
public class overload
{
double area=0;

public double area(double a, double b, double c)


{
double s=(a+b+c)/2;
area=Math.sqrt(s*(s-a)*(s-b)*(s-c));
return area;

}
public double area(int a, int b, int height)
{
area=0.5*height*(a+b);
return area;
}
public double area(double diagonal1, double diagonal2)
{
double area=0.5*(diagonal1*diagonal2);
return area;

}
}

244

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Step
Class name different from method name (area)
Declare variable for area
First method declaration
Computing semi-perimeter, s
Computing area of triangle : s*(s-a)*(s-b)*(s-c)
Computing area of triangle : Math.sqrt()
return area
Second method declaration
Computing area of trapezium
return area
Third method declaration
Computing area of rhombus
return area
Description of variables/ comments/ mnemonics

Question 8

Using the switch statement, write a menu driven program to calculate the maturity amount of
a Bank Deposit.
The user is given the following options:
(i) Term Deposit
(ii) Recurring Deposit
For option (i) accept principal(P), rate of interest(r) and time period in years(n). Calculate
n
 r 
and output the maturity amount(A) receivable using the formula A= P 1 
 100 
For option (ii) accept Monthly Installment (P), rate of interest(r) and time period in months
(n). Calculate and output the maturity amount(A) receivable using the formula
n( n  1) r 1
A=P×n + P× × ×
2 100 12
For an incorrect option, an appropriate error message should be displayed. [15]

245

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ comments
Common mistakes:
Suggestions for teachers
(i) Mathematical expressions converted to Java
 Regular practice exercises must be
incorrectly.
undertaken in class to convert algebraic
(ii) Menu not displayed or choice not input.
expressions to Java.
(iii) Break missing at the end of each case or default
not present.  The importance and use of displaying
(iv) Declaration of variables was not properly done. menu or inputting choice to be stressed
upon.
 Syntax of switch-case to be thoroughly
discussed and revised in connection with
lot of programming questions.
 How to properly place declaration of
variables storing data as per requirement
of the question must be reinforced.

MARKING SCHEME
Question 8
import java.io.*; //import java.util.*;
public class bank
{ public void sampleMethod()throws IOException // throwsInputMismatchException
{ double P,A=0,r,n,x; int choice;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//Scanner sc=new Scanner(System.in);
System.out.println("Enter Choice(1) Term Deposit (2) Recurring Deposit ");
choice=Integer.parseInt(br.readLine());//sc.nextInt();
switch(choice)
{
case 1:
System.out.println(" Enter Principal:");
P=Double.parseDouble(br.readLine());//sc.nextDouble();
System.out.println(" Enter rate of interest:"); r=Double.parseDouble(br.readLine());
System.out.println(" Enter time period in years:");
n=Double.parseDouble(br.readLine());//sc.nextDouble();
x=1.0+r/100.0;
A=P*(Math.pow(x,n));
break;
case 2:
System.out.println(" Enter Monthly Instalment:");
P=Double.parseDouble(br.readLine());//sc.nextDouble();
System.out.println(" Enter rate of interest:"); r=Double.parseDouble(br.readLine());
System.out.println(" Enter time period in months:");
n=Double.parseDouble(br.readLine());//sc.nextDouble();
x=P*n;
A=x+ P*(n*(n+1)/2.0)*(r/100.0)*(1.0/12.0);

246

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


break;
default: System.out.println("Invalid input");
} System.out.print("Amount = Rs."); System.out.printf("%.2f",A); }}
OR Sytem.out.println("Amount = Rs." +A)

Step
Output menu
Input option
switch statement
case 1 and break
Input 3 parameters (any data type)
Compute Amount for term deposit (ignore data types)
case 2 and break
Input 3 parameters (any data type)
Computing Amount for recurring deposit (ignore data types)
default statement with appropriate message
Output Amount (ignore formatting)
Description of variables/ comments/ mnemonics

Question 9

Write a program to accept the year of graduation from school as an integer value from the
user. Using the Binary Search technique on the sorted array of integers given below, output
the message “Record exists” if the value input is located in the array. If not, output the
message “Record does not exist”.
{1982, 1987, 1993, 1996, 1999, 2003, 2006, 2007, 2009, 2010} [15]

247

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Examiners’ comments:
(i) “Binary Search” is a very direct and fixed logic Suggestions for teachers
hence question based on it has to be a full mark
- BINARY SEARCH technique should be
question. However some candidates were not
taught with proper dry runs with
clear about the logic or its working. Sequence of different data (numeric and string). Each
statements were incorrect thus giving the statement / step should be taught with a
impression that the statements were learnt dry run with the data and then explained.
thought rote memory, for e.g.: Further students should be given plenty
Mid value calculated outside while loop OR of exercises to dry run data with this
technique and see if the correct result of
instead of comparing the search value with the binary search is achieved.
value at mid position the comparison is done - Syntax of array initialization to be
between search value and mid position i.e., discussed and students should be given
instead of arr[mid] just mid is used lower = mid + practice exercises to declare 1-D arrays.
1 and upper = mid – 1 confused or interchanged - Dry run of this logic very essential in
explaining to students.
according to the conditions.
(ii) Syntax of initialization of 1-D array whether thru
input or direct were not correct.
(iii) Outputting of messages incorrectly placed.

MARKING SCHEME
Question 9
import java.io.*; //import java.util.*;
public class BinarySearch {
public static void main() throws IOException
{ int[] intArray = {1982, 1987, 1993, 1996, 1999, 2003, 2006, 2007, 2009, 2010};
int searchValue = 0;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//Scanner sc=new Scanner(System.in);
System.out.print("Enter a number to search for: ");
searchValue = Integer.parseInt(br.readLine());//sc.nextInt();
boolean b=false;
int start, end, mid;
start = 0;
end = intArray.length - 1; // end=9
while (start <= end) {
mid = (start + end) / 2;
if (intArray[mid] == searchValue)
1 mark
{ System.out.println("Record exists"); b=true; break;}
else if (intArray[mid] < searchValue)
start = mid + 1;
248

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


else

end = mid - 1;
}
if (b==false) System.out.println("Record does not exist");
}
}

Step
Assign (or accept) values to integer array
Input number to be searched

Initialize boolean or integer value to check if search number exists in


array (Deduct mark if boolean/integer value status does not change
when search number is located)
Initialise start index and end index of array
Condition statement while(start<=end)
Compute middle index
Check if array item at middle index equals search number
Output "Record exists", break to exit loop
Check if array item at middle index less than search number
start index = middle index +1
Check if array item at middle index greater than search number
end index = middle index - 1
Condition and output message "Record does not exist"
Description of variables/ comments/ mnemonics

249

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC


Topics /Concepts found difficult

 Multi-line comments, escape sequences, default values of data types.


 Precedence of operators.
 Identifying variables of different data types and types of statements.
 Multiple / nested Mathematical and String functions.
 Nested Loops.
 Static/ non-static variables.
 Conversion of algebraic expressions to Java expressions.
 Syntax of switch-case and array declaration and initialization.

Suggestions for students

 Computer Applications is a logic based subject like Mathematics and highly scoring in nature. It
needs to be given time of self-study revision and practice at least 3 times a week for a duration of ½
an hour each day followed by a complete review of week’s work during the week end. Do not leave
this subject to be studied on the eve of the examination.
 All exercises, general and Programming to be maintained in a register and revised during exam
preparation.
 Syntax of each element of Java to be thoroughly studied.
 At the time of answering, every question must be read at least twice before answering.
 All programs must be written with suitable comments – whether in class or during exam.
 A good variable description containing a list of important variables used in the program along with
their data types and purpose must be given at the end of every program.

250

Click this link to buy latest Educart books on Amazon - https://amzn.to/3sO7MAC

You might also like