BCGS CA I10 ME Jan23

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

·4 \ I

- ,. P V, L. , , '\N\ ,> J,
'11\Ai .
'
IJl),10\ )l
- , _' ,, ,.,
'I,
"
' - ' _·_.....
I~
~-r BISHOP CO'ITON GIRLS' SCHOOL
MODEL EXAMIN ATION JAN UARY 2023
CLASS:X COMPUTER APPLICATION
Date: 19/01/2023 TIME: 2 hours
Max.Marks:100

Answer to t~is 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 11":e given at the head ofthis Paper is the time allowedfor writing the answers.
The intended marks for questions or parts ofquestions are given in brackets [ ].

SECTION A (40 Marks)


Attempt all questions.
Question 1

Choose the correct answer and write the correct option. [20]
(i) What is the final value stored in variable x ?
double a = -8.59;
double x = Math.abs(Math.ceil(a));
a) 9.0 (b) 7.0 (c) 8.5 (d) 8.0

(ii) Name the type of error in the given statement: double r=Math.sqrt(-100.0);
(a) Syntax (b) Runtime (c) Logical (d) None of the above

(iii) The _ _ _ _ _ _ allows a class to use the properties and methods of another class.
(a) Inheritance (b) Polymorphism (c) Encapsulation (d) None of the above

(iv) Corresponding wrapper class of char data type is _ _ __


(a) character (b) CHARACTER (c) Character (d)CHAR

(v) Name the keyword to make a variable as a class variable


(a) static (b) Static (c) parse (d) valueOf

(vi) Name the intennediate code obtained after compilation


(a) Source code (b) Byte Code (c) Object code (d) binary code

(vii) Name the method with the same name as of the class and which does not have a return
data type is called as: '\ ·.,.
(a) Constructor (b) Function (c) Method (d) Modifier

(viii) The access modes of the members that can be used by derived class during inheritance is:
(a) private or public (b) public or protected (c) protected or public (d) private or protected

(ix) Give the output of the following code:


String A ="26.0", B="74.0";
double C= Double .parseDouble(A) + Double .parseDouble(B);;
System.out.println((A+B+C)); (d) 2774.0
(c) 100100.0
(a) 2674100.0 (b) 200.0

(x) The statement to stop the execution of a construct is: .


(a) System.exit(0); (b) break; (c) STOP; (d) end,

(xi)) Invoking a method by passing the objects ofa class is :efed


0
(d) none of the above
(a) Call by value (b) call by reference (c) call by met
boolean x = !(2>3&&4>6 );
(xii) Give the result of java statement:
(a) True (b) true (c) false (d) False

(xiii) Give the output of: x + = x++ + ++x + --x + x; [ if x = 5 ]


(a) 29 (b) 28 (c) 26 (d) 24

(xiv) Predict the output: int a= 5 , b = 7;


if( a> b)
System.out.print(a+b+",");
System.out.print (a*b);
(a) 12, 35 (b) 35 (c) 57,35 (d) 12,35.0

(xv) What is the value ofx?


String x =(a<= 90) ? "excellent" : "best"; when a= 99
(a) best (b) excellent (c) 99.0 (d) Best

(xvi) What is the output of the snippet below?


n=IO00;
while (n>l0)
{ n=n/10;}
System.out.println(n);
(a) 100 (b) 0 (c) IO (d) 10.0

(xvii) State the total size in bytes of the array a[4] of char data type.
(a) 4 (b) 8 (c) 16 (d) 32

(xviii) Which of the following is not a jump statement injava?


(a) return (b) break (c) continue (d) switch

(xix) The subscript value of elements of an array m[50] are numbered as:
(a) Oto 50 (b) 1 to 50 (c) 0 to 49 (d) 1 to 49

(xx) 'Given: int m=5; m*=5; »nie resultant value stored in mis:
(a) 55 (b) 25 (c) 5 (d) 10

Question 2
a= 0.05-2/ [2]
1) Write a Java statement for the expression:
X-Y
2) Ifx=3, What is the value ofx after executing x+ = x++ +-x + 4 [2]
3) Convert the following into equ· 1
iva ent/or loop:
{ [2)
inti p=O·
whiie(p<,:.20)
{ System.out.print(i+" ")·
p++;} '

4) Rewrite the following using Ternary operator.


[2]
if (income<= 50000)
tax=O;
else
tax=9;
5) Write Java Statements for the followi·ng·
. [2)
Store a number 275 as a String str. c onvert the str to a numenc
· value and assign the
value to a float num.

6) What will be the output for the following Java code:


[4]
String a=''Computer"; String b= "Applications"·
i) System.out.println(a.substring(l,5)); '
ii) System.out.println(a.indexOf{b.charAt(2));
iii) System.out. println(b.substring(5)+" "+a.substring(3) );
iv) System.out.println(a.equals(b));

7) Give the output of the following expressions: [3]


i. x=-9.99, System.out.println(Math.abs(x));
ii. x=9.0, System.out. println(Math.sqrt(x));
iii. x= -9.9, System.out. println(Math.round(x));

8) If array[]= {1,5,6,7,9} [3]


i. What is the value of array.length ?
ii. What is the value ofarray[4]?
iii. What is value ofMath.pow(array[2],2)?

SECTION B (60 Marks)


Attempt any four questions from this Section.
Each p/o;,.am should be written using 'variable descriptions/Mnemonic Codes such that
the !ogic ofthe program is clearly depicted

Question 4 [15)

Define a class Salary described as below.


Data Members: To store Name, Phone and Monthly salary
Date

Member methods:
!! vo!d Salary(): To accept the details ofan Employee including monthly salary.
))! vo)d C~mp( ): To compute Income Tax as 12% of annual salary above Rs. 2,50,000.
_111)
voi~ Pnnt( ): To display the details of the Employee and the calculated Tax if any.
Wnte a mam method to create object of a class and caII the above member methods.

Question S (15)
Define a class to accept and store IO strings into an array and display the foIIowing:

• print all strings starting with vowels.


• print the longest string.
• Create a word by joining all the first characters of each string in the array. Display the
word.

Question 6 [15)

Design a class using function overloading Volume( ) that computes volume of cube, sphere
and cuboid.
Formula: Volume ofcube: side 3
Volume of sphere: 4/3 m3
Volume of cuboid: / x bx h

Question 7 [15)

Write a program to input twenty names in an array and display all the names whose first
alphabet matches with the alphabet entered by the user.
Example: Input: Sam
Annie
Suzy
Chris ..... etc.
Enter the Alphabet : S
Output: Sam
Suzy

Question 8 [15)

Write a menu based program (using switch-case) to generate the following as per the user

choice of I or 2:

I) A 2) 0, 1, I, 2, 3, 5....... (first 20 terms)


BC
DEF
GHIJ
KLMNO A suitable message to be displayed for wrong choice.

Question 9 [15]

Write a program to input and store Total Marks(out of5_00? in a sing!~ dimensional array
TMarks[] of a class of 50 students. Display the marks hst m descendmg order.

You might also like