7535java SP 1314 - Decrypted
7535java SP 1314 - Decrypted
com/
Guess Paper
Class – X
Subject – COMPUTER APPLICATIONS
(Theory)
(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.
------------------------------------------------------------------------------------------------------------
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 [ ].
------------------------------------------------------------------------------------------------------------
SECTION A (40 Marks)
Attempt all questions
Question 1
(a) What is Java? Name some platform over which java can run. [2]
(b) What is meant by precedence of operator? [2]
(c) What is function overloading and which principal of OOP is implemented by the
function overloading? [2]
(d) What is protected access modifier? [2]
(e) Write difference between equals() and compareTo(). [2]
Question 2
(a) State difference between instance variable and local variable. [2]
(b) What is an abstract class? [2]
(c) What do you mean by runtime exceptions? [2]
(d) What is an interface? [2]
(e) Name the process [2]
i) The adjacent elements are compared while arranging elements in a specific order.
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com |
www.niosguess.com | www.iitguess.com
http://www.icseguess.com/
ii) The list is divided into two halves and searching takes place either in lower or upper half.
Question 3
(a) Explain the following line used in Java Program: [2]
public static void main (String args[ ])
(b) Give output of the following code snippet [2]
i) String str = new String( Java World );
System.out.println(str.substring(0). charAt(0)+str. substring(5));
ii) String str = JAVA APPLICATIONS ;
System.out.println(str.lastIndexOf(st.charAt(1)));
(c) What is dot (.) operator? [2]
(d) Name the function of Scanner class which is used to read line of text and double data
type. [2]
(e) How many times the following loop will execute and what will be final output? [2]
int i,j ;
int c=0;
for(1=1; i<=10; i*=2)
for(j=1;j<=3; j++)
c++;
System.out.print((i*j*c));
f)Convert the following for loop into equivalent while loop [2]
int i,j ;
for(1=1; i<=5; i=i+2)
for(j=1;j<=3; j++)
System.out.print((i+ ));
g) What is the return type of the following functions: [2]
compareTo(), random(),trim() and nextLong()
h) What is the use of break and continue? [2]
i) Write difference between string objects created using String and StringBuffer class. [2]
j)Name the function of Wrapper class Character which is used to check whether given
character is [2]
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com |
www.niosguess.com | www.iitguess.com
http://www.icseguess.com/
Create object of this class in main method() and invoke the functions to perform the desired
task.
Question 5. Write a menu driven program to print following pattern based on user’s choice
1 or 2. [15]
Pattern 1 Pattern 2
69 68 67 66 65 A
69 68 67 66 AB
69 68 67 ABC
69 68 ABCD
69 ABCDE
Question 6. Define a class to overload a function generate() to perform following tasks [15]
generate(int n) – generates fibonacci series upto n terms– 0, 1, 1, 2, 3, 5,
…(upto n terms)
generate(int m, int n) – generates all prime numbers between m and n, assume
that m is less than n.
Question 7. Write a menu driven program to check if number entered by user is [15]
a) Supersix Number- A number which contains at least two or more sixes.
b) Automorphic number – A number is said to be automorphic if it is present as
last digit(s) in the square of itself.
Question 8. Write a program to find the smallest word in the sentence entered by user. [15]
Sample input: John enjoyed swimming in the lake
Output: in
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com |
www.niosguess.com | www.iitguess.com
http://www.icseguess.com/
e-mail : [email protected]
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com |
www.niosguess.com | www.iitguess.com