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


Attempt all quesUons from Section A and any four questions from Section B. The intended rnarks for questions or parts of questions are given in brackets [ ].


SECTION A (40 Mark)

Attempt all questions from this Section


Question 1.

 (a) What is the difference between an object and a class ?                                                                               [2]

(b) What does the token ‘Keyword’ refer to, in the context of Java ? Give an example for keyword. [2]

(c) State the difference between entry controlled loop and exit controlled loop.                                        [2]

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

(e) What is the difference between / and % operator ?                                                                                    [2]


Question 2.

(a) State the total size in bytes, of the arrays a[4] of char data type and p[4] of float data type. [2]


  •  (i) Name the package that contains Scanner class.
  • (ii) Which unit of the class gets called, when the object of the class is created ? [2]

(c) Give the output of the following:

String n = “Computer Knowledge”;

String m = ‘Computer Applications’;

System. out. prinfin(n, substring(0,8), concat(m, substring(9)));

System. out. println(n.endsWith(‘e”));[2]

(d) Write the output of the following:

  1.  System. out.println(Character, isUpperCase(‘R’));[2]
  2.  System. out. println(Character, toUpperCase(‘J’));[2]

(e)What is the role of keyword void in declaring function ?[2]


Question 3.

(a) Analyse the following program segment and determine how many times the loop will be executed.

if(p< 100)
p=p – 20;
System.out.println(p);                                                                                                                             [2]

(b) What will be the output of the following code ?

(i) lntk–5, j=9;

k+–k++-++j + k;
System. out.println(“k–‘+k);

(ii) double b = – 15.6;

double a = Math.rint(Math.absib));
System. out. prlntln(“a=”+a);  [2]

(c) Explain the concept of constructor overloading with an example.                                                            [2]

(d)   Give the prototype of a function search which receives a sentence sentnc and a word wrd and returns 1 or 0 ? [2]

(e) Write an expression in Java for z – 5×3 + 2y/x+y                                                                                                                   [2]

(f) Write a statement each to perform the following task on a string:                                                             [2]

  1.  Find and display the position of the last space in astring s.
  2. Convert a number stored in a string variable x to double data type.

(g) Name the keyword that

  1.  Informs that an error has occurred in an input/output operation.
  2.  Distinguishes between instance variable and class variables.

(h) What are library classes ? Give an example.
(i) Write one difference between Linear Search and Binary Search.

SECTION B (60 Marks)
Attempt any four questions from this Section


Question 4

Define a class called mobike with the following description;

Instance variables/data members:

int bno- to store the bike’s number

int phno – to store the phone number of the customer

String name – to store the name of the customer

int days – to store the number of days the bike is taken on rent

int charge – to calculate and store the rental charge


Member methods:

void input() – to input and store the details of the customer

void compute() – to compute the rental charge.

The rent for a mobile is charged on the following basis:

First five days Rs. 500 per day.

Next five days Rs. 400 per day.

Rest of the days Rs. 200 per day.

void displayi) – to diapay the details in the following format:


Bike No.                Phone No.                              Name No.                          of days Charge                                                      [ 15]


Question 5.

Write a program to input and store the weight of ten people. Sort and display them in descending order using the selection sort technique. [15]

Question 6.

write a program to input a number and print whether the number is a special number or not. (A number is said to be a special number, if the sum of the factorial of the digits of the number is same as the original number).

Example: 145 is a special number, because 1 I+41+51= 1 +24+ 120= 145

(Where I stands for factorial of the number and the factorial value of a number is the product of all integers from 1 to that number, example 51=1’2’3’4’5=120).                                                   [15]


Question 7.

Write a program to accept a word and convert it into lowercase if it in uppercase, and display the new words by replacing only the vowels with the character following it.


Sample Input: computer

Sample Output: cpmpvtfr                            [ 15]


Question 8.

Design a class to overload a function compare() as follows:

(a) void compare(int, int)- to compare two integer values and print the greater of the two integers.

(b) void compare(char, char) – to compare the numeric value of two characters and print the character with higher numeric value.

(c) void compare(String, String ) – to compare the length of the two strings and print the longer of the two.              [ 15]


Question 9.

write a menu driven program to perform the following: (Use switch – case statement)

(a) To print the series 0, 3, 8, 15, 24 ….. n terms (vlaue of ‘n’ is to be an input by the user.) [ 15]

(b) To find the sum of the series given below :

S = 1/2 + 3/4 + 5/6 + 7/8 …………….. 19/20.

« Previous Next »

Click Here for ICSE Question Papers 2013 for Class 10

Click Here for ICSE Class X All Question Papers 2011

ATSE 2019 | Scholarship Worth 12 Lac Apply Now!!

Leave a Reply