0% found this document useful (0 votes)
42 views5 pages

Class X COMP 23 Mock

Computer Project

Uploaded by

dastanwistha336
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)
42 views5 pages

Class X COMP 23 Mock

Computer Project

Uploaded by

dastanwistha336
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/ 5

JOGAMAYA MEMORIAL INSTITUTE

MOCK TEST EXAMINATIONS 2022- 23


CLASS X
SUBJECT – COMPUTER APPLICATIONS
FM : 100 TIME 2hrs.
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. [20X2=20]

(a) Answer of 11/3*6+8%3


1. 18
2. 19
3. 20
4. None of these

(b) What makes the Java platform independent?

1. Advanced programming language


2. It uses bytecode for execution
3. Class compilation
4. All of these

(c) Which of the following option leads to the portability and security of Java programs?
1. Polymorphism
2. Inheritance
3. Encapsulation
4. None of these

(d) Evaluate the following Java expression, if x=4 then find x+=(x++) + (++x) + x
1. 40
2. 30
3. 20
4. None of these
(e) Find the value of x, double a = 3.75; double x = Math.floor(Math.ceil(a));
1. 4.0
2. 3
3. 3.0
4. None of these

(f) _____________ is the package contains Wrapper class objects.


1. util
2. io
3. math
4. None of these

Page 1 of 5
(g) The size of float datatype in bits =______________

1. 34
2. 8
3. 32
4. 16

(h) Which keyword in java is used for exception handling?


1. exep
2. excepHand
3. throw
4. All of these
(i) __________ are the values of the program stored within the variables.
1. Keywords
2. Constructor
3. Class
4. Literals
(j) The class variables are also called__________ variable.
1. Object
2. Global
3. Member
4. Instance
(k) Which translator can convert the code at once
1. Interpreter
2. Compiler
3. Assembler
4. None of these
(l) The constructor name must be same as its
1. name
2. calling function
3. class name
4. variable name
(m) Without the break statement the switch case will execute this
1. Constructor
2. Fall through
3. Logical error
4. Infinity
(n) Find the value of Math.sqrt(-36 )
1. 6.0
2. NAN
3. -6.0
4. 6
(o) The __________ function never change its state.
1. Fixed
2. Pure
3. Impure
4. None of these

Page 2 of 5
(p) Math.sqrt( ) can work only on positive literals
1. True
2. False
(q) Math.abs(6.3) = 6.3
1. true
2. false
(r) A User defined function and a constructor is same.
1. True
2. false

(s) int x= (23> (3*7))?(23+7):(23-7); find x


1. 35
2. 30
3. 32
4. None of these

(t) for (int i = 0; ; i++)


System.out.print ("ICSE");

1. Compile error
2. ICSEICSEICSE
3. ICSE [ for infinite times]
4. None of these

Question 2. [10X2=20]

a) What is Encapsulation?
b) If a= 2, b = 4 then find x = ++a * --b + (a++ + ++b)
c) How the objects are related with the classes?
d) What is Wrapper class?
e) char a = (( 65+ 70) > 1000 ) ? (char)65: (char)70; find the value of a.
f) Find the outputs:
String a = “Malayalam”, b = “aeroplane”;
i) System.out.println((a+b).lastIndexOf(‘a’));
ii) System.out.println((a.substring(0,4)+b.substring(4));
g) What is the access specifier?
h) An array a have the elements like 4 1 8 2 3, find the output after executing 3rd iteration by using bubble sort.
i) Write the java expression of √𝑥 𝑦 + √𝑦 𝑥
j) Write one difference between of equals( ) ans equalsIgnoreCase().

SECTION B ( 60 MARKS )
Attempt any four questions from this Section. The answers in this Section should consist of the Programs in either Blue J
environment or any program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes so that the logic of the program is clearly
depicted. Flow-Charts and Algorithms are not required.
----------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 3 of 5
Question 4.

Define a class named bsort which will accept 10 user given array elements, sort (Ascending) and display the array
elements by using Bubble sort. [15]

Question 5.

A Dudeney number is a positive integer that is a perfect cube such that the sum of its digits is equal to the cube root of
the number. Write a program to input a number and check and print whether it is a Dudeney number or not.
Example:
Consider the number 512.
Sum of digits = 5 + 1 + 2 = 8
Cube root of 512 = 8
As Sum of digits = Cube root of Number hence 512 is a Dudeney number. [15]

Question 6.

Write a Java program to accept a string and a choice display the like this
Sample Input: ICSE
Press 1 to display
I
I C
I C S
I C S E
Press 2 to display
I
C C
S S S
E E E E
[15]
Question 7.

The monthly electricity bill is to be computed as follows:


Minimum Rs 250 for the first 100 units.
Plus Rs 0.60 per unit for the next 50 units.
Plus Rs 0.50 per unit for the next 50 units.
Plus Rs 0.40 per unit for any unit beyond 200.
Write the Java program which calculates the monthly bill for A customer based on the number of units consumed. [15]

Question 8.

Write a class with the name volume using function overloading that computes the volume of a cube, a sphere and a
cuboid.
Formula
volume of a cube (vc) = s*s*s

Page 4 of 5
volume of a sphere (vs) = 4/3* π* r* r*r (where π = 3.14 or 22/7)
Volume of a cuboid (vcd) = l* b* h

Question 9.

Write a program to accept a word and convert it into lowercase if it is in uppercase, and display the new word by
replacing only the vowels with the character following it :
Example :
Sample Input : computer
Sample Output : cpmpvtfr [15]

===========

Page 5 of 5

You might also like