0% found this document useful (0 votes)
57 views6 pages

MCK Prelim Paper

The document provides a pre-board examination question paper for Class X students taking the Computer Applications subject. It contains 20 multiple choice questions in Section A testing concepts like OOPs, arrays, strings, loops, methods etc. Section B has 8 additional questions of varying marks on related concepts to be attempted.

Uploaded by

Shaswat Jha
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)
57 views6 pages

MCK Prelim Paper

The document provides a pre-board examination question paper for Class X students taking the Computer Applications subject. It contains 20 multiple choice questions in Section A testing concepts like OOPs, arrays, strings, loops, methods etc. Section B has 8 additional questions of varying marks on related concepts to be attempted.

Uploaded by

Shaswat Jha
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
You are on page 1/ 6

25

M.C.KEJRIWAL
VID YAPEETH
F.M. 100

PRE-BOARD EXAMINATION II 2023-2024 Time 2 hrs.


SUBJECT:COMPUTER APPLICATIONS
CLASS:X
You willnot be allowed to write during the
This time is to be spent in reading the first 15 minutes.
The time given at the head of this paper is the question paper.
time allowed for writing the answers.
This Paper is divided into two
Attempt allquestions from Section Aand any fourSections:
questions from Section B.
The intended marks for questions or parts of questions are given in brackets[ J
SECTIONA (40 Marks)
(Attempt allquestions from this Section.)
Question1
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.) (20]

() ldentify the property of OOP from the given image:


Base
class

Derived Derived Derived


1 2 3
(a) Abstraction (b) encapsulation (c) inheritance (a) polymorphism

(ü) Write a methodprototype namely, check() which takes an integer argument and returns acharacter:
(a) char check( ) (b) void check(int x) (c) check(int x) (d) char check(int x)

() When an object of a Wrapper class is converted to its data corresponding primitive type, it is called as
(a) Boxing (b) Explicit conversion (c) Unboxing (d) Implicit conversion

(iv) The element in x{4] of the array (3,5,7, 12, 16, 18,20,35,42, 89} is:
(a) 16 (b) 12 (c) 7 (d) 18

(v) Which of the following declaration and initialization is the below line equivalent to?
String str= new String( );
(a) String str = " (b) String str="0"; (c) String str-nul; (d) String str="\0";

(vi) State the value of 'y' after the following gets executed:
char x=9'; y-Character.isLetter(x);
(a) false (b) 9 (c) true (d) 9"
Turn Over.
This question paper consists of 6 printed pages.
(vi)Specify the return type ofa constructor methed.
(a) int (b) char (c) String (d) No return type
(viii) Select the access specifier that allows that allows the visibility of any data
(a) private member in a subclass:
(b) default (c) public (d) protected
(ix) Predict the final value that will be stored in variable 'x' after the following
double a=-7.35;
lines get executed:
double x=Math.abs(Math.floor(a);
(a) 9.0 (b)7.0 (c) 8.0 (d) 7
(x) Give the output:
int num[|={3,5,10,12,8):
System.out.print(nunm[2]+ "\t"+num{4-2);
(a) 1010 (b) 10 10 (c) 100 (d) 0
(xi) Give the output of thefollowing expression: a -=a -- + --a-a-; when a=10;
(a) 0 (b) 8 (c) 18 (d) None of these
(xii) Which of the folowing statements is true about con structors:
(a) Constructor methods are automatically invoked.
(b) Constructor methods needs to be explicitly invoked.
(c) Constructors always have a return typc.
(d) Constructors are private methods of a class.
(xii)Give the output:
"COMMENCEMENT". lastIndexOf(»M");
(a) 2 (b) 3 (c) 8 (d) 0
(xiv) Predict the output: devote".compareTo("DEVOTE");
(a) 32 (b) -32 (c) 0 (d) 100

(xv) The number of bytes occupied by 'a' will be:


(a) 2 (b) 4 (c) 8 (d) 16
(xvi) The output of the function COMPOSITION".substring(3,6) is:
(a) POSI (b) POS (c) MPO (d) MPOS
(xvi) Assertion: In Java, library methods of Character class are inherently compiled based on character
argument's numeric value.
Reason: Java works upon the ASCII range of values.
(a) Both Assertion and Reason are true and Reason is a correct explanation of Assertion
(b) Both Assertion and Reason are true and Reason is not a correct explanation of Assertion
(c) Assertion is true and Reason is false
(d) Assertion is false and Reason is true

(xviii) Select the searching mechanism that primarily works only on pre-sorted arrays:
(a) Linear (b) Birary (c) Both of these (d) None of these
(Xix) Choose the sorting mechanism that compes reincort array elements in pairs simultaneously:
(a) Selection (b)lnsertion (c) Bubble (d) None of these

-2
Av) ASSertion: In Call By Reference mechanism, the
reflected back upon the actual changed values of the formal parameters are
Reason: The mechanism works arguments,
and manipulates as
upon the well.
memory addresses of each object as required.
(a) Both Assertion and
Reason are true and Reason is a correct
(b) Both Assertion and Reason are true and Reason is not a explanation of Assertion
(c) Assertion is true and correct explanation of Assertion
(d) Assertion is false and Reason is false
Reason is true
Question 2

(i) Write the Java expression for (p + q)³


[2]
(ii) Evaluate the expression when the value of x= 20:
X*= x +++ -- X+X
[2]
(iii) The following code segment should print
«Excellent Conduct if you have 0 negative marking
(NM) and also 50 as your positive marking (2]
so that it compiles and runs
(PM). Howvever, the code has errors. Fix the code
boolean NM=True:
correctly.
boolean PM= False:
if (NM && PM)
System.out.printin("Poor Conduct"):
else

System.out.printIn("Excellent Conduct"):
(iv) The following program segment when executed is
displaying zero
values given as input. Rewrite the modified program code to get theirrespective
of any non-zero
correct answer. (2]
void trapezium(double a, double b, double h)

double area= 1/ 2*(a+b) * h;


System.out. println("Area=+area);

(v) How many times the following Ioop will get executed? Also, specify the output.
[21
int counter = 10:
do

System.out.println(counter):
}while(- - counter>=5);

(vi) Write the output of the following Library methods: [2]


(a) *ATACAMA". replace('A', B').concat(RR");
(b) *ABC". tolowerCase( )+ "CBA". toUpperCase( );

-3
(vi)Give two points of differences between length) function and
length property of an array. (2)
(viii)Consider the following array and answer the
questions given below:
int x[ ] = { 23,45,67,12,45,89,24,12,9,7};
(a) What is the size of the array?
(b) What is the position of 89?
(ix) Specify the default values for the following primitive
(a) Any variable of char type.
types: (2|
(b) Any variable of double type.
(x) Mention the type of conversion /casting performed in the
given statements: (2]
(a) int a,b;
double res;
res=a+b:
(b) int x:
char res=(char)x;

SECTION B (60 Marks)


(Answer any four questions from this Section.)
The answers in this Section should consist of the Programs ineither
BlueJ environment or any
program environnent with Java as the base.
Each progran should be written using Variable descriptions/Mnemnonic Codes such that the
logic
of the program is clearly depicted.
Flowcharts and Algorithms are not required.
Question 3
[15)
Design a class nane ShowRoom with the following description:
Instancevariables/ Data members:

String name - To store the name of the customer


long mobno -To store the mobile number of the customer
double cost -To storc the cost of the items purchased
double dis -Tostore the discount amount
double amount -Tostorc the amount to be paid after discount
Member methods:

ShowRoom() default constructor to initíalize data members


void input( ) -To input customer name, mobile number, cost
void calculate( ) -To calculate discount on the cost of purchased items, based on
following criteria

-4
Cost Discount (in percentage)
Lessthan or equal to 10000
5%
More than 10000 and less than or equal to 20000
More than 720000 and less than or equal to 35000
10%
15%
More than 35000 20%

void display () T1odisplay customer name, mobile number, amount to be paid after discount.

Write a main() method to create an object of the class and call the above member methods.

Question 4 [15]

Write a program to input a number and check and print whether it is a Pronic number [15] or not.
(Pronic number is the number which is the product of two consecutive integers)

Examples:
12 =3 x 4.
20 = 4 x 5
42 =6 x 7

Sample Input Enter a number: 12


Sample Output : Pronic Number

Question 5 [15]
descending order
Define a class to accept values in integer array of user defined size. Sort them in an
using selection sort technique. Display both the unsorted and the sorted arrays.
Question 6
[15]

of every word to upper


Write a program in Java to accept a string in lower case and change the first letter
case. Display the new string.

Sample Input :we are in cyber worid


Sample Output : We Are In Cyber World
Question 7 [15]
Define a class to accept values in an integer array of user defined size in ascending order.
Accept the search element from the user:. Now, implementBinary Search mechanism and search for the
element within the array. Display the element searched for along with its position within the array, if the
search is successful. Otherwise, display the message, "Unsuccessful Search":.

-5
Question 8

Design a class to overload a function check () as follows : |15)

(i) void check (String str, char ch) -to find and print the frequency of acharacter in a string.

Example :

Input:
str ="success
ch='s
Output:
Number of s present is = 3

(ii) void check(String si) - to display only vowels from string si, after converting it to lower case
Example:

Input:
sl =computer
Output:
Oue

-( -

You might also like