0% found this document useful (0 votes)
46 views3 pages

Class X Pre Board 23

This document contains a pre-board examination for Class 10 students on the subject of Computer Applications. It has two sections - Section A with 20 multiple choice questions worth 1 mark each, and Section B with 4 questions worth 15 marks each. The questions test concepts related to classes and objects, methods, arrays, strings, loops, conditional statements, and mathematical functions in Java. Some example questions include defining a Student class with methods to input details, calculate percentage, and display output, checking if a number is unique, checking if a matrix is semi-magical, finding if a word is present in a sentence, and overloading the volume method.

Uploaded by

charlespowel1802
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views3 pages

Class X Pre Board 23

This document contains a pre-board examination for Class 10 students on the subject of Computer Applications. It has two sections - Section A with 20 multiple choice questions worth 1 mark each, and Section B with 4 questions worth 15 marks each. The questions test concepts related to classes and objects, methods, arrays, strings, loops, conditional statements, and mathematical functions in Java. Some example questions include defining a Student class with methods to input details, calculate percentage, and display output, checking if a number is unique, checking if a matrix is semi-magical, finding if a word is present in a sentence, and overloading the volume method.

Uploaded by

charlespowel1802
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ABBOT SHISHU HALL

Preboard Examination
Class – X Subject – Computer Application F.M – 100 Time – 2 hrs

SECTION A (40 Marks)


Answer al questions from this section
Question 1. [20 x 1 = 20]
i. If the class Dog inherits the properties of the class Animal then which of the following is the name given to the Dog
class?
a. Super class b. Sub class c. Child class d. Both b and c
ii. Which of the following is the process of creating an instance of a class?
a. Initialization b. Instantiation c. Creation d. None of these
iii. Which of the following keyword is used to create an object of a class?
a. new b. public c. static d. void
iv. Which of the following is encoding techniques made of 128 characters consisting of letter, digits and special characters?
a. ASCII b. UNICODE c. Both a and b d. None of these
v. How many punctuators are there?
a. 9 b. 6 c. 7 d. None of these
vi. What will be the output of the following code? int a =3, b=4; System.out.print((a++) + “, ” + (++b));
a. 4,5 b. 3,4 c. 3,5 d. 4,4
vii. When primitive data type is converted to a corresponding object of its class, it is called:
a. Boxing b. Unboxing c. explicit type conversion d. implicit type conversion
viii. Which of these datatypes can be used for a method having a return statement in it?
a. void b. float c. int d. both int and float
ix. A method need to be called with help of an object.
a. void b. class c. non-static d. static
x. Parameters used in the method call statement are ….?
a. Actual parameters b. Informal parameters c. Formal parameters d. void parameters
xi. Choose the odd one
a. nextInt() b. nextDouble() c. nextline() d. next()
xii. Which of the following method is used to extract a set of characters from a string?
a. trim() b. equals() c. length() d. substring()
xiii. If break is not used with switch case, then the program……….
a. Causes a syntax error b. Executes normally c. Causes fall-through situation d. Causes a logical error
xiv. consider the following code:
int i, j=0, sum=0;
for( i =1; i<=5; i++)
for(j = 2; j<=5; j++)
break;
sum = sum + j;
Which of the following is the final value of the sum?
a. 1 b. 2 c. 50 d. 60

1 P.T.O
xv. Which of the following keyword is used to create a static method?
a. public b. protected c. static d. private
xvi. Assertion(A): A loop inside another loop is called a nested loop.
Reason(R): The break statement is used for exiting the loop.
a. Both (A) and (R) true and (R) is correct explanation of (A)
b. Both (A) and (R) true and (R) is not correct explanation of (A)
c. Assertion (A) is true and reason (R) is false
d. Assertion (A) is false and reason (R) is true
xvii. Which of the following is the correct syntax to create a parameterized constructor?
a. public int pco(int i){} b. public pco(){} c. public pco(int i){} d. private int pco(int i){}
xviii. Math.sqrt(-16) method returns …………….
a. 4.0 b. -4.0 c. NaN d. 4
xix. Which of the following is returned by the Math.cbrt(125.0) method?
a. 25.0 b. 5.0 c. -5.0 d. Error
xx. Which of the following is correct?
a. +,-,*, /,() b. (),/,*,+, - c. /,*, (), +, - d. None of these
Question 2. [10 x 2 =20]
i. What is call by reference ?
ii. Give two example of relational and logical operators.
iii. what is constructor? Name various type constructors.
iv. Give the size of each of the following in bytes: a) char b) double
v. What is Scanner class?
vi. Write a ternary operation to check if a given number is happy or not? [ a number is called happy if the repetitive
sum of the square of its digits returns 1]
vii. int x=10, y=15; x = ((x<y) ? (y+x) : (y-x)); what will be the value of x after executing the above statement?
viii. change the following code segment into a do while loop: int x, x; for(x=10, c=20; c>=10; c=c-2) x++;
ix. What will be the output : System.out.println((“ALEPPI”).lastIndexOf(‘P’));
System.out.println(“School”.substring(2));
x. What will be the output : math.ceil(5.7) + math.floor(5.5).

2 P.T.O
SECTION B ( 60 MARKS)
Answer any four questions from this section
Question 3. [15]
Define a class Student having following description:
Data members:
String name : to store the name
String clname : to store class name
double marks : to store the marks obtained by the student
double Fmarks : to store full marks
percentage : to store the percentage obtained
Member functions:
input() : to enter the class, name and Full marks.
percentageCal() : calculate percentage of a student on given full marks.
display() : output details of student
Write a program to compute the grade based on the following conditions:
Percentage Grade
90% and above A+
75% and above B+
60% and above C
40% and above D
Less than 40% Fail
Write main method to create an object and call the methods.

Question 4. [15]
Write a program in java to enter 10 names in an Array. Find and print largest name , smallest name and their
positions.

Question 5. [15]
Write a program to input a multidigit number from user and check if the given number is unique or not.
[Example: 121 – not unique for double occurrence of 1 but 123 – unique as there is no double occurrence]

Question 6. [15]
Write a program in java to input a nxn matrix and check if it is semi magical. An array is semi magical if the sum of all
the elements is divisible by sum of the diagonal.

Question 7. [15]
Write a program in java to find if a given word is present in a sentence which is terminated by either ? or .
input : god are you there?
Output: valid. Enter word : god
god is present in number 1 position.
input : devil are you there
output: invalid Enter word: devil
devil is not present but position cannot be disclosed for an invalid input

Question 8. [15]
Design a class to overload a function volume as follows :
Void volume(int s) – to calculate and print the volume of a cube(side 3)
Void volume (int l, int b, int h) – to calculate and print the volume of a cuboid (length x breadth x height)
Void volume (double r) – to calculate and print the volume of a sphere(4/3πr^3)

3 P.T.O

You might also like