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

Std. 10 - Computer Applications

This document is a pre-board examination paper for Class X in Computer Application at Loyola School, Bhubaneswar, scheduled for January 2025. It includes two sections: Section A with multiple-choice questions and Section B requiring programming tasks, covering topics such as Java programming, data structures, and algorithms. Students are instructed to answer all questions in Section A and any four from Section B, with a total of 80 marks available.

Uploaded by

newatiadevanshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Std. 10 - Computer Applications

This document is a pre-board examination paper for Class X in Computer Application at Loyola School, Bhubaneswar, scheduled for January 2025. It includes two sections: Section A with multiple-choice questions and Section B requiring programming tasks, covering topics such as Java programming, data structures, and algorithms. Students are instructed to answer all questions in Section A and any four from Section B, with a total of 80 marks available.

Uploaded by

newatiadevanshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

LOYOLA SCHOOL, BHUBANESWAR

Pre-Board Examination, January - 2025


Class: X Subject: Computer Application F.M. = 80 Times:2 Hrs.
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 twoSections. Attempt all questions from Section A and any four questions from Section B.
The intended marks for the questions or part of questions are given in brackets[].

SECTION A (40 Marks)


(Attempt all questions in this Section)
Question 1
Choose the correct answers to the questions from the given options. [1x20]
(i) ATM

Name the feature of Java depicted in the above picture.


(a) Encapsulation (b) Inheritance
(c) Abstraction (d) Function Overloading
(ii) Which of the following is used to create an instance of a class?
(a) public (b) class
(c) static (d) new
(iii) The char datatype occupies ____________ bytes.
(a) 2 (b) 0
(c) 4 (d) 8
(iv) What is the value of x1 if x=5?
x1 =++x- x++ + --x;
(a) 6 (b) 0
(c) 12 (d) 5
(v) Which of the following is a valid java keyword?
(a) New (b) Final
(c ) static (d) Switch
(vi) The output of the following code is ____________.
System.out.println(Math.ceil(89.9)+Math.floor(90.5));
(a) 0.0 (b) 180
(c) 180.0 (d) 180.4
(vii) The String method which results only in a positive integer is___________
(a) indexOf() (b) lastIndexOf()
(c) compareTo() (d) length()
(viii) What is the output of the following program code?
int points=6;
switch(points)
{
case 6:;
case 7: System.out.println(“Pass”); break;
case 8: ;

Page 1 of 6
case 9 : System.out.println( “ Excellent”); break;
case 10: System.out.println( “ Outstanding”); break;
default: System.out.println( “ Fail”); break;
}
(a) Pass (b) Excellent
(c) Outstanding (d) Fail
(ix) A girl wanted to calculate the sum of two numbers stored as a and b multiplied by 7. Select the
appropriate java expression.
(a) a+ b*7 (b) 7*a+b
(c) (a+b)*7 (d) a+7*b
(x) What is the output of the following program code?
int i=70;
for( ;i>60; )
{
System.out.print(“ ”+i);
i--;
}
(a) Run time error (b) Compile time error
(c) 70 69 68 67 66 65 64 63 62 61 (d) 70 69 68 67 66 65 64 63 62
(xi) Sam performs bubble sort on the following array to organize the elements in ascending order.
int a[]={5,1,2,3};
After the first comparison the array is {1,5,2,3}
What would be the array after the next comparison?
(a) {1,2,5,3} (b) {1,5,3,2}
(c) {1,3,5,2} (d) {1,3,2,5}
(xii) Method prototype for the method max which accepts a double argument and an integer
argument and has a double return type is
(a) double max(double a, int b) (b) Double max(int a, double b)
(c) void max(int a, double b) (d) void max(int a, double b)
(xiii) What will be the output of the following java statement?
System.out.println(“Baby”.compareTo(“Bad”));
(a) false (b) -1
(c) 2 (d) -2
(xiv) A single dimensional array contains N elements. What will be the last subscript?
(a) N+1 (b) N
(c) N-1 (d) N+2
(xv) The______ keyword that signifies that the function does not return a value.
(a) void (b) Null
(c) empty (d) blank
(xvi) Assertion(A): Java statements written in lowercase or uppercase letters are treated as the same.
Reason: (R) Java is case sensitive language.
Based on the above discussion choose an appropriate statement for the options given below.
(a) Both Assertion (A) and Reason (R) are true and reason R is the correct explanation of Assertion (A)
(b) Both Assertion(A) and Reason(R) are true, and Reason(R) is not the correct explanation of Assertion(A)
(c) Assertion (A) is true and Reason R is false.
(d) Assertion (A) is false, and Reason R is true.
(xvii) Akash wants the members of his class Employee to be accessible only to his class “Employee”.
What access specifier he should use for the members
(a) private (b) protected
(c) public (d) default
Page 2 of 6
(xviii) What will be the output of the following?
System.out.println(“SUNDAY”.substring(3));
(a) NDA (b) DAY
(c) SUN (d)N
(xix) If the name of the class is “Green” , what can be the possible name for the constructor?
(a) green (b) Green
(c) GrEEN (d) gReen
(xx) Assertion(A): Character.isLetter() function is used to check whether a given argument is a letter
or not.
Reason: (R): It always returns a boolean type value, either true or false.
Based on the above discussion choose an appropriate statement for the options given below.
(a) Both Assertion (A) and Reason (R) are true and reason R is the correct explanation of Assertion (A)
(b) Both Assertion(A) and Reason(R) are true, and Reason(R) is not the correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason R is false.
(d) Assertion (A) is false, and Reason R is true.

Question 2 [2x10]
(i) Rewrite the following program statement using logical operators:
if(x>5)
if(x>y)
System.out.println(x+y);
(ii) Evaluate the expression:
x+=x++ + ++x + --x +x; when x=7;
(iii) Consider the following program statement and answer the question given.
for(int k=1;k<=5;k++)
System.out.println(k);
System.out.println(k);
Will the above program statements get executed successfully? If not, then identify the error and
correct the error.
(iv) Write the java expression for | x 2 +2xy|
(v) The output of a program which executes a part of string “COMPASSION” is as
(a) “PASS” (b) “PASSION”
Write appropriate Java statements to get the above output.
(vi) Write the return datatype returned by the library function
(a) indexOf() (b) charAt()

(vii) Give the output of the following snippet


String s= “COMPUTER”;
String s1= “APPLICATION”;
System.out.println(s.concat(s1));
System.out.println(s1.replace('I', 'E').substring(0,5));

(viii) Give the output of the following code.


for(int i=5;i>1;i--)
{
if( i%2> =1)
continue;
System.out.println(i+ “” );

Page 3 of 6
}
(ix) Consider the following class:
public class myClass
{
static int x=3,y=4;
int a=2,b=3;
}
(a) Name the variables for which each object of the class will have its own distinct copy.
(b) Name the variables that are common to all the objects of the class.
(x) Give the output of the following
int a, b=0;
int c[]={1,2,3,4,5,6,7,8,9,10};
for(a=0;a<10;a++)
{
if(a%2==0)
b+=c[a];
}
System.out.print(b);

SECTION B (60 Marks)


(Answerany four questions in 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 description/ mnemonic codes so that the logic of
the program is clearly depicted.Flowcharts and algorithms are not required.
Buffered Reader/Data Input Stream should not be used in the programs.

Question3 [15]
Define a class named BookFair with the following description:
Instance variables/Data members:
String Bname — stores the name of the book
double price — stores the price of the book
double disc— stores the discount
double amt— stores the price of the book after discount
Member methods:
(i) BookFair() — Default constructor to initialize data members
(ii) void input() — To input and store the name and the price of the book.
(iii) void calculate() — To calculate the price after discount. Discount is calculated based on the following
criteria.
Price Discount
Less than or equal to Rs.1000 2% of price
More than Rs.1000 and less than or equal to Rs.3000 10% of price
More than Rs.3000 15% of price
(iv) void display() — To display the name and price of the book after discount.
Write a main method to create an object of the class and call the above member methods.

Question 4 [15]
Define a class to search for a value input by the user from the list of values given below. If it is found then
display the element along with its position, otherwise display the message “Search element not found” using
Binary search technique.
Page 4 of 6
15, 21, 28, 35, 53, 62, 76, 88, 90, 98
Question 5 [15]
Write a program to input a string in uppercase and print the frequency of each character in the string.
Sample Input: COMPUTER HARDWARE
Sample Output
CharacterFrequency
A 2
C 1
D 1
E 2
H 1
M 1
O 1
P 1
R 3
T 1
U 1
W 1

Question 6 [15]
Define a class to accept values into a 4x4 arrayandcalculate and print the sum of each column. Also print
the array in matrix form.
Example:
A[][]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}}
Output:
Sum column 1=1+5+9+13=28
Sum column 2=2+6+10+14=32
Sum column 3=3+7+11+15=36
Sum column 4=4+8+12+16=40
1 2 3 4
5 6 7 8
9 10 11 12
13 14 1516

Question 7 [15]
Define a class to accept a number and check whether it is a SuperSpy number or not. A number is called
SuperSpy if the sum of the digits is equal to the number of digits.
Example:
Input: 1021
Output: SuperSpy number [Sum of the digits=1+0+2+1=4, Number of digits=4]

Question 8 [15]
Define a class to overload a function print() as follows:
void print(): To display the following format using nested loop
99999
77777
55555
33333
11111
void print(intnum, char ch) with one integer argument and one character argument, computes and prints the
square of integer argument if choice ch is ‘s’ otherwise find its cube.

Page 5 of 6
***************All the best ***************

Page 6 of 6

You might also like