0% found this document useful (0 votes)
34 views5 pages

Mock 6

This document outlines an examination paper for Grade X ICSE, consisting of two sections: Section A with 40 marks and Section B with 60 marks. Students are required to answer all questions from Section A and any four from Section B, covering topics such as Java programming, exceptions, and data structures. The paper includes theoretical questions and practical programming tasks related to loan calculations, number classification, and employee salary management.

Uploaded by

anushara26
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)
34 views5 pages

Mock 6

This document outlines an examination paper for Grade X ICSE, consisting of two sections: Section A with 40 marks and Section B with 60 marks. Students are required to answer all questions from Section A and any four from Section B, covering topics such as Java programming, exceptions, and data structures. The paper includes theoretical questions and practical programming tasks related to loan calculations, number classification, and employee salary management.

Uploaded by

anushara26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GRADE:X ICSE MAX.

MARKS :100
Answers to this paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this paper is the time allowed for writing the answers.
This Paper is divided in to two sections.

Attempt all questions from Section A and any four questions from Section B.

The intended marks are indicated against each question.

Section A - 40 marks
[Attempt all questions]
Question 1:

a) “Object is an instance of class” . Explain [2]

b) Define Polymorphism [2]

c) Differenciate between JDK and BlueJ [2]

d) Write equivalent java expression for the following [2]


-5 3 3
a) 1.5-1.0 e b) (a +b )/3ab

e) What do you mean by coercion? [2]

Question 2:

a) What is an Exception ?How will you handle it ? [2]

b) Write a java statement to compare two strings (m[i] and m[j]) in a single dimensional array [2]

c) What do you mean by a token in scanner object ? [2]

d) What do you mean by recursive function ? Give an example. [2]

e) Differentiate static and non-static data members [2]

Question 3:

a) What is the output [2]


if a=12, b=8, find a*=++a/6 + b++ %3
b) Consider the following code and answer the questions [2]
class abc
{
int x,y;
void access()
{
int a,b;
abc student = new abc();
System.out.println(“”);
} }
i) What is the object name of the class abc ?
ii) Write the local variables used in the program.
c) Analyse the following program segment and determine how many times the loop will be executed
and what will be the output of the program segment ? [2]
int k =1;i=2;
while(++i<6)
k*=i;
System.out.println(k);
d) If array[] ={1,9,8,5,2,4,66,7,23}; [2]
i) What is the length of the array given above ?
ii) What is array[5] ?
e) Write the output for the following [2]
String m = “Second”;
String n = “Preparatory”;
i)System.out.println(m + n);
ii)System.out.println(m.length());
iii) System.out.println(m.charAt(2));
iv) System.out.println(m.substring(0));
f)
g)Give the result of the following [2]
int a=18;int b=12;
Boolean t = (a>20&&b<15)?true:false;
h) Give the output [2]
int m[] = {9,25,17,15,44};
int a[0] = {11};
m[1] =m[3];
int p = a[0] + m[1];
System.out.println(p);
i) Rewrite using ternary [2]
if ( a!=b)
p=(a-b);
else
p=(b-a);
j) Find the error [2]
int k = 10;
while(k>=1)
{
continue;
k--;
}
Section B ---- (60 marks)

(Attempt any FOUR questions)


Each program should be written in JAVA language with BlueJ as it’s base. Program
should be clearly written such that the logic is clearly depicted. Flowcharts and
algorithms are NOT REQUIRED. Variable Descriptions and comments should be
written.

Question 4: [15]

The Bank sanctions ‘Housing loan ‘ to the employees belonging to HIG group, MIG group or LIG
group according to their yearly income:
LIG: Lower Income Group
MIG : Middle Income Group
HIG : High Income Group

Category Yearly Income Loan Amount


LIG group Up to Rs. 1,50,000 15 % of annual income
MIG group Rs. 1,50,001 – Rs. 5,00,000 20 % of annual income
HIG group >5,00,001 25 % of annual income
Write a program to calculate the loan amount to be sanctioned by the Bank taking Name, yearly
income and the category(‘L’ for LIG group, ‘M’ for MIG group and ‘H’ for HIG group) as inputs.

Question 5: [15]

Write a menu driven program to accept a number and check whether it is a twisted prime or
Disarium number.
A prime number is said to be ‘Twisted Prime’, if the new number obtained after
reversing the digits is also a prime number.
Sample Input : 167
Sample Output : 761. So 167 is a twisted prime number.

A number will be called DISARIUM if sum of its digits powered with their respective
position is equal with the number itself.
Sample Input: 135
Output : It is a DISARIUM
(Workings 11+32+52 = 135, some other DISARIUM are 89, 175, 518 etc)
Question 6: [15]

A non-palindrome word can be made a palindrome word by just adding reverse of the word
aith the original word . Write a program to accept a non-palindrome word and display the
new word after making it a palindrome
Sample input : ICSE
Sample output : ICSEESCI

Question 7: [15]

Define a class Salary in Java with the following details:


Data members:
name[] array to store names of 20 employees.
netsal[] array to store net salary of 20 employees.
Member functions:
void input() to accept names of 20 employees and their corresponding net
salaries.
void selection() to sort the array netsal in descending order and arrange the names
accordingly. Use selection sort technique.
void print() to print the sorted data in the following format.
Net Salary Name
………………………. ……………………….
………………………. ……………………….

Question 8:

Write a program that uses an overloaded function compute () as follows: [15]

i) void compute (int, char) : to compute square of integer argument if character argument
is ‘s’ otherwise finds its cube.
ii) void compute (double, char): to compute volume of cube if character argument is ‘v’

otherwise finds its diagonal.

iii) void compute (int, int, char) : to compute area of rectangle if character argument is

‘a’ otherwise finds its perimeter.

Volume of cube = side3

Area of rectangle = l * b
Diagonal of cube = a√3

Perimeter = 2 (l * b)

Question 9: [15]

Write a program in java to accept 10 different numbers and display the greatest and the smallest of
the numbers

You might also like