ICSE Class 10 Computer Applications ( Java ) 2013 Solved Question Paper

If you have any doubts, ask them in the comments section at the bottom of this page.

ICSE Paper – 2013
Class – X
Subject – Computer Applications
(Two Hours)

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)


Question 1

a) What is meant by precedence of operators? [2]
Ans. Precedence of operators refers to the order in which the operators are applied to the operands in an expression. For example, * has higher precedence than +. So, the expression 8 + 2 * 5 will evaluate to 8 + 10 = 18

b) What is a literal? [2]
Ans. A literal is a constant data item. There are different literals like integer literals, floating point literals and character literals.

c) State the Java concept that is implemented through:
i) a super class and a subclass.
ii) the act of representing essential features without including background details. [2]
Ans. i) Inheritance
ii) Abstraction

d) Give a difference between constructor and method. [2]
Ans. i)A constructor has no return type which a method has a return type.
ii) The name of the constructor should be the same as that of the class while the name of a method can be any valid identifier.
iii) A constructor is automatically called upon object creation while methods are invoked explicitly.

e) What are the types of casting shown by the following examples? [2]
i) double x =15.2;
int y =(int) x;
ii) int x =12;
long y = x;
Ans. i) Explicit casting
ii) Implicit casting

Question 2:

a) Name any two wrapper classes. [2]
Ans. Byte, Short, Integer, Long, Float, Double, Boolean, Character

b) What is the difference between break and continue statements when they occur in a loop. [2]
Ans. The break statement terminates the loop while the continue statements current iteration of the loop to be skipped and continues with the next iteration.

c) Write statements to show how finding the length of a character array and char[] differs from finding the length of a String object str. [2]
Ans. The length of a character array is found by accessing the length attribute of the array as shown below:
char[] array = new char[7];
int lengthOfCharArray = array.length;
The length of a String object is found by invoking the length() method which returns the length as an int.
String str = “java”;
int lengthOfString = str.length();

d) Name the Java keyword that: [2]
(i) indicates a method has no return type.
(ii) stores the address of the currently calling object.
Ans. i) void
ii) this

e) What is an exception? [2]
Ans. An exception is an unforeseen situation that occurs during the execution of a program. In simpler words, they are the errors that occur during the execution of a program. The JRE throws an Exception object to indicate an exception which contains the information related to that exception.

Question 3:

a) Write Java statement to create an object mp4 of class digital. [2]

b) State the values stored in variables str1 and str2 [2]

Ans. s2.substring(5) gives ” matters”. When ‘t’ is replaced with ‘n’, we get ” manners”.
“good” when concatenated with ” manners” gives “good manners”.
So, str1 = ” manners” and str2 = “good manners”.

c) What does a class encapsulate? [2]
Ans. A class encapsulated the data (instance variables) and methods.

d) Rewrite the following program segment using the if..else statement. [2]


e) How many times will the following loop execute? What value will be returned? [2]

Ans. In the first iteration, ++x will change x from 2 to 3. y-=x++ will increase x to 4. And y becomes 50-3=47.
In the second iteration, ++x will change x from 4 to 5. y-=x++ will increase x to 6. And y becomes 47-5=42.
In the third iteration, ++x will change x from 6 to 7. y-=x++ will increase x to 8. And y becomes 42-7=35.
In the fourth iteration, ++x will change x from 8 to 9. y-=x++ will increase x to 10. And y becomes 35-9=26.
In the fifth iteration, ++x will change x from 10 to 11. y-=x++ will increase x to 12. And y becomes 26-11=15.
Now the condition x<=10 fails.
So, the loop executes five times and the value of y that will be returned is 15.

f) What is the data type that the following library functions return? [2]
i) isWhitespace(char ch)
ii) Math.random()
Ans. i) boolean
ii) double

g) Write a Java expression for ut + ½ ft2 [2]
Ans. u * t + 0.5 * f * Math.pow ( t, 2)

h) If int n[] ={1, 2, 3, 5, 7, 9, 13, 16} what are the values of x and y? [2]

Ans. n[4] is 7 and n[2] is 3. So, Math.pow(7,3) is 343.0.
n[5] is 9 and n[7] is 16. So Math.sqrt(9+16) will give 5.0.
Note that pow() and sqrt() return double values and not int values.

i) What is the final value of ctr after the iteration process given below, executes? [2]

Ans. Outer loop runs five times. For each iteration of the outer loop, the inner loop runs 3 times. So, the statement ++ctr executes 5*3=15 times and so the value of ctr will be 15.

j) Name the methods of Scanner class that: [2]
i) is used to input an integer data from standard input stream.
ii) is used to input a string data from standard input stream.
Ans. i) nextInt()
ii) nextLine()

SECTION B (60 Marks )

Attempt any four questions from this Section.

The answers in this section should consist of the program in Blue J environment with Java as the base. Each program should be written using Variable descriptions / Mnemonics Codes such that the logic of the program is clearly depicted.

Flow-charts and Algorithms are not required.

Question 4:

Define a class called FruitJuice with the following description: [15]
Instance variables/data members:
int product_code – stores the product code number
String flavour – stores the flavor of the juice.(orange, apple, etc)
String pack_type – stores the type of packaging (tetra-pack, bottle etc)
int pack_size – stores package size (200ml, 400ml etc)
int product_price – stores the price of the product
Member Methods:
FriuitJuice() – default constructor to initialize integer data members
to zero and string data members to “”.
void input() – to input and store the product code, flavor, pack type,
pack size and product price.
void discount() – to reduce the product price by 10.
void display() – to display the product code, flavor, pack type,
pack size and product price.



Question 5:

The International Standard Book Number (ISBN) is a unique numeric book identifier which is printed on every book. The ISBN is based upon a 10-digit code. The ISBN is legal if:
1xdigit1 + 2xdigit2 + 3xdigit3 + 4xdigit4 + 5xdigit5 + 6xdigit6 + 7xdigit7 + 8xdigit8 + 9xdigit9 + 10xdigit10 is divisible by 11.
Example: For an ISBN 1401601499
Sum=1×1 + 2×4 + 3×0 + 4×1 + 5×6 + 6×0 + 7×1 + 8×4 + 9×9 + 10×9 = 253 which is divisible by 11.
Write a program to:
(i) input the ISBN code as a 10-digit integer.
(ii) If the ISBN is not a 10-digit integer, output the message “Illegal ISBN” and terminate the program.
(iii) If the number is 10-digit, extract the digits of the number and compute the sum as explained above.
If the sum is divisible by 11, output the message, “Legal ISBN”. If the sum is not divisible by 11, output the message, “Illegal ISBN”. [15]


The data type of ISBN should be long instead of int as the maximum value of an int is 2,147,483,647 which is less than 9999999999 – the maximum possible value of an ISBN.


Question 6:

Write a program that encodes a word into Piglatin. To translate word into Piglatin word, convert the word into uppercase and then place the first vowel of the original word as the start of the new word along with the remaining alphabets. The alphabets present before the vowel being shifted towards the end followed by “AY”.
Sample Input(1): London Sample Output(1): ONDONLAY
Sample Input(2): Olympics Sample Output(2): OLYMPICSAY [15]



Question 7:

Write a program to input 10 integer elements in an array and sort them
In descending order using bubble sort technique. [15]


Question 8:

Design a class to overload a function series() as follows: [15]
(i) double series(double n) with one double argument and returns the sum of the series.
sum = 1/1 + 1/2 + 1/3 + ….. 1/n
(ii) double series(double a, double n) with two double arguments and returns the sum of the series.
sum = 1/a2 + 4/a5 + 7/a8 + 10/a11 ….. to n terms



Question 9:

Using the switch statement, write a menu driven program: [15]
(i) To check and display whether a number input by the user is
a composite number or not (A number is said to be a composite, if it
has one or more then one factors excluding 1 and the number itself).
Example: 4, 6, 8, 9…
(ii) To find the smallest digit of an integer that is input:
Sample input: 6524
Sample output: Smallest digit is 2
For an incorrect choice, an appropriate error message should be displayed.


ICSE Class 10 Computer Applications 2013 Solved Question Paper

Editorial Staff

Editorial Staff at TCA is a team of Programmers led by Shubham Tripathi. Trusted by over 100K readers worldwide

    See all posts by shubham

    Leave a Reply

    Your email address will not be published. Required fields are marked *