Sei sulla pagina 1di 3

http://www.icseguess.

com/

Sample Paper – 2010


Class – X
Subject – Computer Applications

FULL MARK-100 TIME:2HRS

Answer 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 is the time allowed for writing the answer.
--------------------------------------------------------------------
This paper is divided into two Sections. Answer all Questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in [].
--------------------------------------------------------------------

SECTION A(40 Marks)


Attempt all questions.

Question 1.
(a) What do you understand by JVM? [2]
(b) What is an abstraction? [2]
(c) Explain the terms in relation to Switch
i) break ii) case iii) default [3]
(d) Explain working of following operator with example [3]
i) Left shift ii) Bitwise & iii) ? operator

Question 2.
(a) What object is being referred to in the statement? [1]
int Len = str.length();
(b) What does the following means? [1]
Employee staff = new Employee();
(c) What is function overloading? [2]
(d) What is meant be nesting of loops? Give an example? [2]
(e) Differentiate between ‘=’ and ‘==’ operator. [1]
(f) Differentiate between XOR(^) and compliment(~) operator. [1]
(g) Illustrate the output of Bubble sort after each pass on the
following numbers: 4, 3, 1, 9, 6, 2 [2]

Question 3.
(a) A java program contains the following statements: [4]
int i=8, j=5;
double x=0.005, y=0.01;
char c ='c', d='d';
Determine the value of the following:
i) Math.sqrt (x*x + y*y)
ii) Math.pow (x-y,3)
iii) Math.abs (i - 2*j)

-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com
http://www.icseguess.com/

iv) isDigit(c)
(b) Enter any value through parameter constructor and write a
program to calculate and print the factorial of that value. [3]
(c) What purpose is served by the 'import' keyword? [1]
(d) What do the following functions return for: [4]
String x = "Learning";
String y = "Point";
(i) System.out.println(x.substring(1,5));
(ii) System.out.println(x.indexOf(x.charAt(4)));
(iii) System.out.println(y+x.substring(5));
(iv) System.out.println(x.substring(y.length());
(e) What is Instance variable? [1]
(f) Explain the different types of access specifier? [3]
(g) Differentiate between braek and continue techniques? [2]
(h) Differentiate between primitive and composite datatypes? [2]

SECTION-B [60 Marks]


Attempt any four questions from this Section. The answers in this Section should consist
of the Program in BlueJ environment with Java. Each program should be written in using
Variable descriptions/Mnemonic Codes such that the logic of the program is clearly
depicted. Flow charts and Algorithms are not required.

Question 4.
A company has employees who are divided into four grades as follows:
Grade Basic(Rs. per month) DA(% of Basic) HRA(% of Basic)
1 10,000 or more 40% 30%
2 5,000 - < 10,000 40% 25%
3 < 5,000 but > 2,000 30% 20%
4 2,000 or less 30% 15%
If the Net salary which is the total of Basic, DA, and HRA, is above Rs.50,000 per month then
Income Tax at the rate of 30% of the annual salary exceeding 50,000 is deducted on monthly
basis at source. Taking name of the employees and the Basic (monthly) pay as inputs, a pay slip,
which contains Name, Grade, Basic monthly pay, DA, HRA, Monthly Income Tax and Net
Monthly Salary, for employee is to be printed. Write a java program to perform this job.
[15]

Question 5.
(a) Write a program in Java to input a number and check whether it is a Magic Number or not.
(b) Write a program, which will read a text and count the occurrences of the word "the". For e.g.
if the input is "The cat jumped over the fence", the output should be 2.
[8+7]

Question 6.
Display a menu as follows:
1. Check for prime number
2. Display number of digits

-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com
http://www.icseguess.com/

3. Exit
Each option is defined in a separate function within the subclass, the required parameter is
accepted in the main class. The main class is also to display the menu and to accept the choice
from the user and to execute the corresponding function (use data input concept).
[15]

Question 7.

Write a program in java to display the following structure


// A
// BCD
// EFGHI
// JKLMNOP

Question 8.
Write a program to input the values of three coefficients (A,B,C) of a quadratic equation: (AX2 +
BX + C = 0). Find the roots of the equation and display them, stating whether roots are real
unequal, real equal or imaginary.
[10+5]

Question 9.
(a) Define a class 'numMagic' with two methods revNum(int n) and digitSum(int n). The method
revNum(int n) reverses the number passed as an argument for e.g. if then number is 346 it
returns 643. digitSum(int n) returns the sum of the digits.
[8]
(b) Using the concept of 'function overloading' write a class with functions 'fact(int)' and
‘fact(int,int)’ which will calculate the value of n!/r!(n-r)! where n and r are given by the user.
[7]

Paper Submitted By: Mr. Jaideep Mahalik


Email Id: jaideepmahalik@gmail.com
Telephone No. 09937166621

-------------------------------------------------------------------------------------------------------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com

Potrebbero piacerti anche