100% found this document useful (2 votes)
1K views4 pages

X Computer Pre Board I

1. The document contains a pre-board examination paper for Class 10 Computer Applications subject. It has two sections - Section A with 20 multiple choice questions and Section B containing programming questions. 2. For Section A, students have to attempt all questions which are worth 40 marks total. Section B is worth 40 marks and students must attempt any 4 questions which involve writing Java programs. 3. The questions test concepts like methods, constructors, inheritance, arrays, strings and more. Section B focuses on writing programs to overload methods, calculate taxes, sort arrays, check palindromes and more.

Uploaded by

hargunnkaur31802
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views4 pages

X Computer Pre Board I

1. The document contains a pre-board examination paper for Class 10 Computer Applications subject. It has two sections - Section A with 20 multiple choice questions and Section B containing programming questions. 2. For Section A, students have to attempt all questions which are worth 40 marks total. Section B is worth 40 marks and students must attempt any 4 questions which involve writing Java programs. 3. The questions test concepts like methods, constructors, inheritance, arrays, strings and more. Section B focuses on writing programs to overload methods, calculate taxes, sort arrays, check palindromes and more.

Uploaded by

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

Christu Jyoti Convent Sr. Sec.

School Baghpat
Pre Board Examination
Subject - Computer Applications
Class – X
TIME – 2 hours M.M.-80
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 [20]
(i) A method can return ………
(a) 1 value (b) 2 values (c) 3 values (d) any number of values
(ii) In Java a constructor with no parameter is called a
(a)Default constructor (b)user defined constructor
(c)custom constructor (d)static constructor
(iii) Private function is accessible to......
(a)Own class only (b)sub class and class in the same package
(c)subclass (d)none of these.
(iv) Function prototype means
(a)Return value of a function (b)Name of a function
(c)Return type of a function (d)Return type, name and argument of a function.
(v) Which of the following represent the constructor of the ABC class
(a)ABC() (b)ABC (c)ABCconstructor (d)Constructor ABC ()
(vi) What is the return type of indexOf() function of string class?
(a)char (b) String (c)boolean (d)int
(vii) The ability of a method or object to take on multiple forms is called.
(a) abstraction (b) encapsulation (c)inheritance (d)polymorphism
(viii) Which of the following is a keyword?
(a) token (b) continue (c) constant (d) all of these
(ix) Name the method used to convert String value into int?
(a) ParseInt() (b) parseInt (c) parseInteger (d) none of these
(x) The ……… allows a class to use property of another class.
(a) Encapsulation (b) Abstraction (c) inheritance (d) None of these
(xi) The ……… operator is used to access method of a class.
(a) Object (b) new (c) (.)dot (d) import
(xii) The statement System.out.println(1+2+“four ”+2+5); gives the output………
(a)3 four 5 (b)3 four 23 (c) 12 four 23 (d) error
(xiii) x + = x++ + --x + --x + x; [ x = 5 ]
(a) 23 (b) 20 (c) 18 (d) none of these
(xiv) Math.pow(Math.ceil(4.22), Math.cbrt(8));
(a) 16 (b) 25 (c) 25.0 (d)16.0
(xv) Consider the following String array and give the output:
String arr[ ]={"Java", "PHP", "Python", ".Net", "HTML"};
System.out.print( arr[2].charAt(2)+” “+arr[3].indexOf(‘N’));
(a) h -1 (b) H 1 (c) t 1 (d) Runtime Error
(xvi) Predict the output of the following statement:
String wd[ ] = {"INDIA", "USA", "NEPAL", "GERMANY", "MEXICO"};
System.out.println(wd[2].substring(0,3) + wd[4].substring(4));
(a) USANY (b) MEXPAL (c) NEPCO (d) INDNY
(xvii) The return data type of Integer.parseInt( ) method is ________ .
(a) String (b) int (c) void (d) Integer
(xviii) Which of the following is not a type of inheritance?
(a) multiple (b) double (c) hybrid (d) single
(xix) Corresponding wrapper class of the char data type is?
(a) String (b) Character (c) Char (d) CHARACTER
(xx) The process to change one data type value to another data type is known as
(a)Declaration (b)Type conversion (c) Converting data type (d)Initialising data type

Question 2
(i) Define method overloading?
(ii) Write an expression in Java for
√3 a+b – b
3a
(iii) State any two differences between user defined data type and primitive data type?
(iv) What is the difference between class variable and instance variable?
int x =20, y = 10, z;
What is the value of x, y, z in
z = ++x * (y – –) %4 – y++*4/--x
Show the steps.
(v) What is the purpose of default in a switch?
(vi) What will be the output of the following code?
String s = “Java is Best”;
System.out.println(s.indexOf(‘A’))
System.out.println(s.charAt(5)+5)

(vii) What do mean by arrays?


(viii) What is the significance of using isDigit() function of Character class?
(ix) Write the Syntax to creating String implicitly and explicitly.
(x) State the output of the following code segment.
char ch;
int x=65;
do
{
ch=(char) x;
System.out.print(ch+ “ “);
if(x%11==0)
break;
x+=2;
}while(x<120);

SECTION B (40 Marks)


Attempt any four questions from this Section.
The answers in this Section should consist of the Programs in either BlueJ 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 3
Define a class Taximeter having the following description:
Data members/instance variables
int taxino – to store taxi number.
String name – to store passenger’s name.
int km – to store number of kilometres travelled.
int bill – to store bill of customer.
Member functions:
taximeter() — constructor to initialize int data members to 0, and string data member to “”.
input() – to store taxino, name and km.
calculate() – to calculate bill for a customer according to given conditions
kilometers travelled(km) Rate/km
first 2 km Rs 25
next 10 km Rs 10
next 10 km Rs 15
above 22 km Rs 20
display()- To display the details.
Design a main method and invoke the above member methods.
Question 4
Design a class to overload a function Sum( ) as follows:
(i) int Sum(int A, int B) – with two integer arguments (A and B) calculate and return sum of square
of all the even numbers in the range of A and B.
Sample input: A=3 and B=10
Sample output: sum = 16 + 36 + 64 + 100
(ii) double Sum( double x, int n ) – with one double arguments(x) and one int type argument(n) and
calculate and return the product of the following series:
2 4 6 8
x x x x
sum = 1+ + + + + ……………….. n terms
4 16 36 64
(iii) int Sum(int N) - with one integer argument (N) calculate and return sum of only odd digits of
the number N.
Sample input : N=43961 Sample output : sum = 3 + 9 + 1 = 13

Question 5
Write a menu driven program to calculate sum of digits of a number and sum of factors of a
number depending upon users choice.
Question 6
Write a program that accept a word and check if it is palindrome or just a special word. Hint A
Palindrome word is which reads the same backward and forward. Example MADAM, LEVEL etc.
Special words are which starts and ends with same character, example COMIC, ATLANTA etc.

Question 7
Write a program that input and store monthly salary of 50 employees in an array and perform
following task.
* Print the highest salary.
* Calculate and print sum and average of salary.
* Count how many employees are taking more than 5 lakh salary per annum.

Question 8
Write a program to sort the given array in descending order using bubble sort technique.
15,25,41,68,92,55,48,21,74,19

You might also like