Computer
Computer
COMPUTER APPLICATIONS
Maximum marks: 50
Time allowed: One hour.
You will not be allowed to write during the first IO minutes.
This time is to be spent in reading the question paper.
ALL QUESTIONS 1RE COMPULSORY.
.The marks intendedfor each question are given in brackets []
Select the correct option for each ofthe Joliowing questions.
Question 1.
Choose the correct answer:
(i) The blueprint that defines the variables and the methods common to all ofa certain [ 1]
kind is termed as:
(a) class
(b) object
(c) package
(d) method
Answer: _ _ _ _ _ __
(ii) A data type which contains integer as well as fractional part and occupies 32 bits [I]
space is:
(a) float
(b) char
(c) . double
(d) byte
Answer: _ _ _ _ _ __
double x=Math.ceil(Math.abs(-7.3));
(a) 7.0
(b) 8.0
(c) 6.0
(d) 9.0
Answer:....,...------
. This paper consists of 14 printed pages.
T22 861 S1 Turn Over
(iv) Which of the following keyword is used to create symbolic constants in Java? [1]
(a) final
(b) Final
(c) Constant
(d) Const
Answer:
-------
(v) Name the type of error in the statement gi:v~n below: [1]
double x;y;z;
Ariswer:
-------
Question 2.
(b) new
(c) New
(d) NEW
Answer: _ _ _ _ _ __
(ii) The operator which acts on one operand is known as -=----- [1]
(a) binary
(b) ternary
(c) unary
(d) relational
Answer:
-------
T22 861 SI . 2
(iii) The ASCII code of' B' is [I]
(a) 67
(b) 66
(c) 98
(d) 99
Answer: _ _ _ _ __
(b) class
(c) non-static
(d) static
Answer: _ _ _ _ __
Answer: _ _ _ _ _ __
Question 3.
Name the following:
(i) The concept of having more than one constructor with different types of parameters: [l]
Answer: _ _ _ _ __
Answer: _ _ _ _ _ __
(iii) The process of binding the data and method together as one unit is called as: [1]
{a) Encapsulation
(b) Inheritance
(c) Polymorphism
(d) Dynamic binding
Answer: _ _ _ _ _ __
(iv) The jump statement that is used inside a switch case construct to terminate a [I]
statement sequence:
{a) continue
(b) break
(c) return
(d) goto
Answer: _ _ _ _ _ __
(v) The program code written in any high-level language to solve a problem is:
[I]
(a) object code
(b) source code
Answer: _ _ _ _ _ __
T22 861 SI 4
Question 4:
State whether the statement is True or False:
(i) char is a non - primitive data type. [I]
(a) True
(b) False
Answer: _ _ _ _ _ __
(ii) Multi.line comments in Java start with/* and end with*/. [I]
(a) True
(b) False
Answer: _ _ _ _ _ __
(a) True
(b) False
Answer: _ _ _ _ _ __
(iv) Java compiler automatically creates a default constructor in case no constructor is [I]
present in the java class.
(a) True
(b) False
Answer: _ _ _ _ _ __
(a) True
(b) False
Answer: _ _ _ _ _ __
Question 5.
Choose the odd one:
(b) %
(c) I
(d) *
Answer:
T22 861 Sl 5 Turn Over
[1]
(ii) (a) double
(b) int
(c) char
(d) String
Answer:
[l]
(iii) (a) if else
(b) if .
Answer:
[l]
(iv) (a) nextlnt()
(b) nextDouble()
(c) nextString
(d) next()
Answer:
[l]
(v) (a) Robust
(b) Platform Independent
(c) Inheritance
(d) Multi threading
Answer:
Question 6.
Give the output of the following: .
(a) 11
(b) 12
(c) 10
(d) 9
Answer:
6
T22 861 St
.,
I
(ii) int x; [1]
for ( x=l; x<=3; x++ );
System.out.print (x);
(a) I23
(b) 1234
(c) 4
(d) I
Answer: _ _ _ _ _ __
. Answer:
-------
(iv) switch(x){ [I]
case 'M':
System.out.print("Microsoft Teams");
break;
case 'G':
· System.out.print("Google Meet");
default:
System.out.print("Any software");
break;
case 'W':
System.out.print("Web Ex");
break;
(d) WebEx
Answer:
[l)
(v) int v=5;
while (--v>=0 ) {
System.out.pri~t(v);
}
(a) 43210
(b) 54321
(c) 543210
(d) 4321
Answer:
Question 7.
Given below is a class with following specifications:
class name Number
void Display(int n) - To extract and print each digit of giveri number from last digit of
the first digit on separate lines.
Example: n=674
Output
4
7
6
void Display() - To print numbers from 0.5 to 5.0 with updation of 0.5.
Fill in the blanks of the given program with !!ppropriate statements.
class (i) _ _ __
{
void Display(int n) {
while((ii) _ _ _ ___J
T22 861 S1 8
{
int rem= (iii)
System.out. println(rem);
n={iv)
}_
}
yoid DisplayO {
for(v) · x<= (vi) ; x+=0.5)
System.out.println(x);
}
}
(i) (a) Number [I]
(b) number
(c) NUMBER
(d) NUM
Answer:
Answer:
Answer:
Answer:
Answer:
(b) x<=S.0
(c) X 5.0
(d) x=S.0
Answer:
Question 8.
A school is giving away merit certificates for the students who have scored 90 percentage
and above in class 10.
The following program is based on 't he specification given below. Fill in the blanks with
appropriate Java statements.
class name Student
Member variables:
String name To enter name of a student
double per To enter percentage obtained by the student
String cer To store the message
Member method
void input() To acceptthe detail
void merit() To check the percentage and award the merit
void display() To display the detail
void main () To create an object of the t;lass and invoke the methods
import java. (i) *·
----
class Student {
String name;
double per;
String cer;
void input() {
1T~22is8'6ii1ss11---------~10~ - - - - - - - - - - ~ - - - - -
per= (ii) _ _ __
void merit()
{
if ((fii),_ _ __
{
cer="A WARDED";
else
cer=(iv)_ _ __
void (v),_ _ __
System.out. println(name );
. . :1 : - -
System.out.println(per);
System.out.println(cer);
·I
}
. void main() {
Student ,s = new (vi)._ _ __
s.input();
s. merit();
s.displayq;
}
}
(i)' (a) utility
[I)
(b) Util
(c) util
(d) UTILITY
Answer:
Answer:
T22 861 SJ
11
Turn Over
[I]
(iii) (a) per>=90
(b) per<=90
(c) per>90
(d) per==90
Answer:
Answer:
(b) Display()
(c) Print()
(d) DISPLAY()
Answer:
(vi) (a) StudentO; [I]
(b) STUDENT()
(c) student()
(d) Student()
Answer:
Question 9.
The following program segment checks whether number is an Abundant number or not. A
number is said to be an Abundant number when the sum of its factors (excluding the
number itself) is greater than the number.
Example:
Factors of number 12 are 1,2,3,4,6
Sum of factors is 1+2+3+4+6 = 16
Fill in the blanks with appropriate java statements
void abundant(int n)
{ int s=0;
for((i) _ _ __ (ii)_ _ _ _ ;i++)
{ if((iii)
T22 861 Sl 12
s=s+i;}
if((iv)_ _ _
System.out.println(" ~bundant Number");
else
System.out.println("Not Abundant Number");
}
(i) · (a) infi=l [l]
(b) int i=0
(c) int i=2
(d) Int i=I
Answer:
Answer:
Answer:
Question 10.
Read the following case study and answer the questions given below by choosing the
correct option:
Java compilation is different from the compilation of other high-level languages. Other
high~level languages use interpreter or compiler but in Java , the source code is first
compiled to produce an intermediate code called the byte code, this byte code is pl~tforrn
independent and is a highly optimized set of instructions designed to be executed by Java
Answer:
-------
(ii) JAVA code is: [I]
(a) Cotnpiled and interpreted
.(b) Only compiled
(c) Only Interpreted
(d) Translated
Answer:
-------
(iii) JAVA source code is compiled to produce: [l]
(a) Object code
(b) Byte code
(c) Final code
(d) Machine code
Answer:
-------
(iv) ,NM is an/ a _ _ _ __
(a) Interpreter
(b) Compiler
Answer:
-------
II T22 861 SI 14