0% found this document useful (0 votes)
31 views

Computer Science

1. The document contains 5 questions in Section A worth a total of 40 marks and asks test takers to attempt all questions. The questions cover topics like arrays, OOP concepts, loops, and data types in Java. 2. Section B is worth 60 marks and contains 5 programming questions to be attempted in Java BlueJ environment. The questions cover arrays, series calculation, mathematical constants, searching algorithms, and generating Armstrong numbers. 3. Test takers are instructed to write well-commented code explaining each step for the programming questions.

Uploaded by

Prashant Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Computer Science

1. The document contains 5 questions in Section A worth a total of 40 marks and asks test takers to attempt all questions. The questions cover topics like arrays, OOP concepts, loops, and data types in Java. 2. Section B is worth 60 marks and contains 5 programming questions to be attempted in Java BlueJ environment. The questions cover arrays, series calculation, mathematical constants, searching algorithms, and generating Armstrong numbers. 3. Test takers are instructed to write well-commented code explaining each step for the programming questions.

Uploaded by

Prashant Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

http://www.icseguess.

com/

Sample Paper – 2010


Class – X
Subject – Computer Science

SECTION A (40 Marks)


Attempt all questions

Q 1. Createand populate one-dimensional integer array where duplicacy of elements is     allowed.


Using any searching algorithm you like, locate the search key (i.e. the element     to be searched) a well
as its number of occurrence in the array taking the search key as     an input from the user.

Q2.
(a) Java is both a programming language and a platform. Comment.
(b) what is polymorphism? How does function overloading implement polymorphism?
(c) a _________ constructor create objects through values passed to it.
(d) where can the following members of a class be accessed: private, public protected?
(e) what is an Exception?
[ 2+2+1+3+2 = 10 ]

Q 3.
(a) what is a compound statement? Support with an example.
(b) State one similarity and one difference between while and do while loop.
(c) What is the significance of default clause in a switch statement?
(d) What is the function of operators? What are binary operators?
(e) What is meant by ‘floating constant’ in java?
[ 2+2+2+2+2 = 10 ]

Q4.
(a) enter any 2 variables through constructor parameters and write a program to swap and print the
values.
(b) What is ‘call by value’ and ‘call by reference’?
(c) Differentiate between if and switch statements.
-------------------------------------------------------------------------------------------------------
www.icbseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com
http://www.icseguess.com/

(d) What is a ‘package’? give an example.


[ 4+2+2+2 = 10 ]
Q5.
(a) Name the four integer data types of Java. [2]
(b) What is a “ternary operator” of Java? [2]
(c) What is meant by “nesting of loops”? Give suitable example. [2]
(d) Differentiate between int and float data type. Give one example for each. [2]
(e) What is Polymorphism? Give one example. [2]

SECTION B (60 Marks)

Attempt any four questions from this section. Write all the programs in Java BlueJ environment and
clearly explain the steps using the mnemonics and comments wherever required.

1. Write a program to initialize an array of 5 names and initialize another array with their respective
phone numbers. Search for a name input by the user, in the list. If found, display “Search
Successful” and print the name along with the phone number, otherwise display “Name not
enlisted. Try other names”. [ 15 ]

2. Write a program to find the sum of the series; S = 1 + x + x2 + ............... + xn. [ 15 ]

3. Write a Write an application that estimates the value of the mathematical constant e by using the
formula: e = 1 + 1/1! + 1/2! + 1/3! + …..

4. Create and populate one-dimensional integer array where duplicacy of elements is     allowed.
Using any searching algorithm you like, locate the search key (i.e. the element     to be searched) a
well as its number of occurrence in the array taking the search key as     an input from the user. [15 ]

5. Write a program to generate all Armstrong numbers between 100 and 500. An Armstrong number is
one which is equal to the cubes of each of its digits. E.g. 153 = 13 + 53 + 33. [ 15 ]

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

You might also like