Full Year Computer
Full Year Computer
D The keyword that eauses the control o fransfer tack to the caller of unethodis
return 5) vod c) pass by valuc d) pass by reference
1uy Tie dethalt value of boolean is:
b) true ) False ) false
81f the valuc of basic j500, *hat will be the value of variable Tar aftet ihe following statement is executed?
Tax =tasic >1200 ? 200: 100
8) 1200 b) 200 c) 100 d) None of thesc
Given the statenent
What is the eqivalerntstatenent
b). pqi d) syntax error
Assertion(A) Java is platform independent.
Irascn(R Java is compilcd to a bytecode that can run on any machine having JVM.
a) Both Asscrtion (A)and Reason (R)are truc and Reason (R) is a
Both Assert:on (A) and Reasan (R) are true and Reason (R) is notcorrect cxplanation of Asscrtion (A)
a correct explanation of Assertion(A)
Assct;on (A) Is true and Reason (R) Is false
PTO
Page 2 of 2
d) Assertion (A) is false and Reuson (R) is true
[15]
Qystion 4:
Besign a class called STORE with the following description:
Class Name : STORE
Member Methods
i. vOid fnlnput () Toinput the customer number, puchase amount,
ii. void fnCalculate ()- Tocalculate the value added tax amount and modify the purchase amount by
the tax loit
iü. void fnDisplay( ) - To display all the member data with proper outputstatements.
iv. void main () - To crcate an object of the class and call the member methods accordingly
--X-
Mondbodeer
Page 1 of 4
Ousck Woof
Mo
parameters:
xv) In any changes in the formal paranmeters is not reflected back to actual
c) Both (a) and (b) d) None
a) pass by value b) call by reference
xvi) Given double x=Math.ceil(Math.abs(-7.3); What is the final value stored in variable x?
a)7.0 b)8.0 c)6.0 d)9.0
Page 3 of4
?
vi. What is an objcct and what is a class
viii. Write the output of thc given code: 2,3, 5) );
int arr[ j[] =((3, 9, 10, 20), (1,arr[Lj31):
System.out.printin ( arr[0|2] +
illustrates
ix Write the 0OP feature that
a) Two methods having same name
members of another class
b) One class getting access to certain
Data Members:
Member Methods:
default constructor to initialize data members
HotelBill( ):
void faTakelnput( ): to accept the customer's name and number of days of stay
void fnCompute( ): to calculate the bill amount as per the given condition
void fnDisplay( ): to display the name and the bill amount
Write amain () method to declare an object ofthe class HotelBill and call the above said mos
Question 5.
Design a class to overload a method Series ) given that
numbers.
(a) long Series (int n) Returns the product of first n even natural
* 4 *6*8*10)
For example, ifn =5then (2
sum of natural numbers from nl to n2 13 + 14 + 15)
(b) long Series (int nl, int n2) Returns the (10+ 11 + 12+
Assuming nl= 10, n2 = |5 then methods.
method to call the two overloaded
Writc the above methods and the main )
Bubble Sort
Question 6.
fill it with variables. Sort it in ascending order using
size 8 and
Create an array CW[ ]of type int and
technique.
For example : 21 76 103
33 87 35 8 483
Input : 483
Output : 8 21 33 35 76 87 103
Question 8.
and print accordingly. Apply a method for Prime
Input anumber in N. Verify whether it is Prime or not
verification, as given -
boolean fnlsPrime(int N)
17
Anumber is called Prime, if it has only 2 factors.For example:
--X
Mondodecp Geh.a.
Page 1 f 4
CHURCH SCHO0L
ASSEMBLY OF GOD
THE 1381, Pal Strect
ket 12
2024-25
Half Yearly Exanination
Computer Application Date
FullMarks : 100
Class. 10
Time 2Hr ( 15min reading time] compulsory )
A140 Marksl rAll questions are
Section |20x1-20|
correct option along wilh its content:
the
comectansler gnd write
Question l:Choose the most applicabie OOP concept
and choose the
Observe the given image is
Pride Rock Territory'
Mufosa, the king of cousin
conspired byScar, his
killed ina plan blamed and sent away.
Mufasa's son Simba is back his
grows up, he wins
Later when Simba
MUCASA grows it further.
father's kingdom and
SIMBA
Type of String is
e)primitive (b) reference (9wraper (d)none of these
The prototype for a method addNum( ) that has two integers as argument and retums their sum:
(a) int addNum(int a, int b) (U voidaddNum(int nl, int n2)
(c) double addNum(double a, double b) (d) int addNum(int nl, int n2);
ation
chancterin
occurTence ofa specilicd On) ration
()chorAt) V) lostlndex
the lasto
the ndesof
thatrebns(hi
The method indexON)
(al compre Tor)
(d) this
keywont (e) publie
of the tollowing is not a
Whch (b)sod is: Mathelss
a) objv corresponding object(d)
datatvpe to its
converla pumitive MO) Wrpper
The class Nedto b)valueOr
(a) Striny isrunning
detected whilethe programare syntactically correct, ofAssertion(A)
are becnusethey esplanation
yAsYertiont A) Runtimeerots does not detectthem Reason(R)Ís acorect explanation of Assertion
ReasonR): The compiler (R)aretrue and a correct
L)Both Assertiom(A) and Reason Irueand
Reason(R)isnot
(R)are
b) Both Assertion (A) and Reason filse
c)Assertion (A)is true and Renson (R) is
Reason (R) is tnie
d)Assertion (A) is talse and
memory requirement (d) double
yIhich ofthe following has least (e) long
(a) short wb) byte
situations
to behave ditferently under different(d) Abstraction
It is an abilhty to have same name but Me) Polymorphisn
(a) Encapsulation (b) Inheritance
a JAVA method.
Avariable declaration can occur
(b) anywhere after its use in
(a) only in the beginning of (d)at the end of
ve)anywhere before its use in
|10x2
Question 2:
array using the following values:
M Write the syntax tocreate a 5 element String
AAA,ccc, EEE, Egg, JIJ
while lop.
j Rewrie usingj=7; i<6; itt, j- -)
for(int i=1,
System.out.printin (i +". "+ i"i ):
n+=2;
continue;
System.out.print( s);
Given:
switch (r)
INDA
(0UNTRY
Question 8. that:
etss to overload amethod named Pack(), given
Befine arguments.
Packtint a, int b)-to print the average of the ton
(a)vord
Packint n) - to print the square of the numbers from I
tb)void of the argument.
soid Packí String s) - to print the last character
4c)
--X