/ http://www.icseguess.com/

GUESS PAPER – 2013
Class – X
Subject – Computer Applications

(Theory)

(Two Hours)

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

Full Marks- 100

SECTION A (40 MARKS)

Section : A

Attempt all the questions.

Question 1

(a) Which inheritance is not directly supported in Java? How do you achieve it? [2]

(b) What is static polymorphism? [2]

(c) How does constructor differ from function ? [2]

(d) Write difference between JDK and BlueJ. [2]

(e) Write difference between instance variable and class variable? [2]

Question 2

(a) What is NumberFormatException? Give example to illustrate. [2]

(b) Write difference between coercion and type casting. Give Example for each. [2]

(c) Define nested loop and empty loop. Give example using while loop. [2]

(d) Evaluate 12|9&5. [2]

(e) Evaluate 12<3 and 100>4. [2]

Question 3

1.  (a) i. Write a prototype of function func() which takes two Time objects as parameter

and returns the greatest of the Time object. [1]

ii) Write a prototype of function amicable() which takes two integers as parameter

and returns true if the numbers are amicable otherwise returns false. [1]

(b) Write a user defined function to find the sum of odd integers of an array arr[] and print the same. [2]

(c) What is copy constructor. Give an example. [2]

(d ) i. Write a statement to convert a character into upper case if it is in lower case. [1]

ii. Write a statement to convert a String into uppercase. [1]

iii. Write a statement to extract 3 last character of a word assuming the word’s [1]

length is greater than 3.

iv) Write a statement to create a char array and store all the vowels. [1]

(e) Give an example to call a function by reference. [2]

(f) What is dangling else problem? How do you resolve it? [2]

(g) Give output of following program if main() method is invoked. Also identify caller function, called function, actual parameter and formal parameter. [4]

public class Output {

public static void main() {

int a=10;

change(a);

System.out.println(a);

}

public static void change(int a){

System.out.println(++a);

}

}

(h) Convert the following for loop into do-while loop [2]

int x=1, s=0;

for( ; ; )

{

if(x>5)

break;

s=s+x;

x++;

}

System.out.println(s);

SECTION B

Attempt any four questions from this Section.

The answer 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 such that the logic of the program is clearly depicted. Flow-Charts and Algorithms are not required.

Question 4.

Define a class Number as described below: [15]

Instance Variables/ Data Members

int n - to store a number

String numtype –to store type of the number

Member methods

input( ) – to input an integer

checkType( ) – a function to check whether number is perfect number or deficient number or abundant number and store the type of number in numtype. The following table is used for evaluating type of the number:

Number(n) Sum(s) of all the factors condition numtype

6 s=1+2+3+6 s=2*n perfect

20 s=1+2+4+5+10+20=42 s>2*n abundant

5 s=1+4 s<2*n deficient

display( ) – To display all the data members

main()- Create object of the class and call all the functions in proper order to perform the task.

Question 5 [15]

Write a menu driven program using concept of function overloading to find the volumes of

Rectangular Prism / side1 * side2 * side3
Ellipsoid / (4/3) * pi * radius1 * radius2 * radius3
Cone / (1/3) * pi * radius2* height

Question 6 [15]

Write a program to input a sentence and perform the following task

a) Print the largest word.

b) Print the word that contains maximum number of vowels..

Question 7 [15]

Write a program to store the names and total marks of 20 students in two different 1 D arrays. Accept any name from the user and print the corresponding total marks using Binary Search technique. Assume that the name array is sorted in ascending order.

Question 8 [15]

Write a program to check whether two numbers are equivalent or not. Two Numbers are said to be equivalent if sum of theirdivisors(excluding the number) are the same. For example, 159 and 703 are equivalent numbers because their proper divisor sum to 57.

b) Write a program to check whether a number is a Niven number or not. A number that is divisible by the sum of its own digits is known as Niven number.

For example, 1729 is a Niven number because 1 + 7 + 2 + 9 = 19 and 1729 = 19 × 91.

Question 9 [15]

Generate following pattern based on user’s choice 1 or 2.

1)  A 2) 1

B A 4 1

C B A 9 4 1

D C B A 16 9 4 1

E D C B A 25 16 9 4 1

****

()

03222-258908

www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com | www.iitguess.com