0% found this document useful (0 votes)
6 views

mock 5

This document outlines the structure and content of a Computer Applications theory exam for Class X, consisting of two sections: Section A with 40 marks and Section B with 60 marks. Section A includes various questions on Java programming concepts, while Section B requires students to write programs addressing specific tasks such as sorting words, calculating employee salaries, and creating acronyms from text. Students are instructed to spend the first 15 minutes reading the questions and to provide answers on separate paper.

Uploaded by

anushara26
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)
6 views

mock 5

This document outlines the structure and content of a Computer Applications theory exam for Class X, consisting of two sections: Section A with 40 marks and Section B with 60 marks. Section A includes various questions on Java programming concepts, while Section B requires students to write programs addressing specific tasks such as sorting words, calculating employee salaries, and creating acronyms from text. Students are instructed to spend the first 15 minutes reading the questions and to provide answers on separate paper.

Uploaded by

anushara26
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/ 3

Class – X

Subject – Computer Applications


(THEORY)
(Two Hours)
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.


You are to answer 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 (2x5=10)

a) Name any two types of Java programs.


b) State the difference between a Constructor & a Method.
c) What does the following mean? Also state the significance of the constant „99‟.
Ferrari F50 = new Ferrari (99);
d) State the difference between an „Instance Variable‟ & „Class Variable‟
e) What is a Wrapper class? Give 2 examples.

Question 2 (2x5=10)

a) Differentiate between „Operator‟ & „Expression‟


b) What is the value of ( (1.0 / 0.0) – (1/ – 0.0) ).
c) Give one difference & one similarity between „switch case‟ and „if…else‟.
d) How many times does the loop iterate? Also give the output for the following code snippet.
int x;
for(x = 1; x< =10; x + +)
{
x + +;
System.out.println(x + +);
}
e) What is the difference between „= =‟ and „equalsIgnoreCase( )‟

Question 3 (2x5=10)

a) If the value of a = 3, what does the expression below evaluate to,


a + = a + + + + + a + a;
System.out.println (a);
b) Find error in the following code snippet,
int a; b ;
for (a=1; b=1;a<=10;a++;b++)
{…
<Statements>
…}
c) Give the output after invocation of the following method,
i. x (28,29)
ii. x (27,39)

public boolean x (int a, int b)


{
boolean c = false;
while (a>1 && b>1)
{
if (a>b)
a – = b;
else
b – = a;
}
if (a = = 1 || b = = 1)
c = true;

return c;
}
d) if (500>200)
x = 200
else
x = 100
Transfer the above Conditional Statement into ternary operator .

e) What is the output of the following


String s = new String (“Kumar”);
String str = s;
System.out.print (str);
System.out.print (str.concat(“s”));

Question 4 (2x5=10)

a) i. Write the Java expression for the following: y = tan (log (13x9 ) )
ii. Evaluate the following if the value of x = 10 and y = 21,
System.out.println (Math.pow(Math.abs(Math.max(Math.min(x, y),y)),2);
b) What is the syntax to define an array ?
c) String s1 = “MINORITY”;
String s2 = “REPORT”;
i. System.out.println(s1.substring(0,3).concat(s2.substring(3,5))
ii. System.out.println(s2.substring(2));
iii. System.out.println(s2.replace(„p‟ , „s‟));
iv. System.out.println(s1.charAt(s1.indexOf(„R‟) + s2.indexOf(„R‟)));

d) What is the use of break statement ?


e) Define Bytecode .

SECTION-B (60 Marks)

Answer any four questions from this Section .


Each program should be written in such a way that it clearly depicts the logic of the problem.
This should be achieved by using mnemonics and comments in the program.
Give the variable list used in the program. Flowcharts and algorithms not required

Question 5 [15]
Write a program to enter any ten words and arrange in alphabetical order (Lexicographically) and
display them.
Question 6 [15]
Write a program to input multiple digited numbers in a single subscripted array of size 10 in the main ( )
method. Pass the array into a function named void remove_sort( ) that will remove the zeros from each
array element and sort the array elements in ascending order using Selection Sort Technique, and re-
display the elements within the same method.

Question 7 [15]
A company has employees, who are divided into four grades depending on their Basic pay per month as
follows,
Basic(Rs./month) Grade DA HRA

10,001 or more 1 40% 30%


5,001 to 10,000 2 40% 25%
2001 to 5,000 3 30% 20%
2,000 or less 4 30% 15%

If the Net salary which is the total of Basic, DA, and HRA, is above Rs.50, 000 per month then Income
Tax at the rate of 30% of the annual salary exceeding 50,000 is deducted on monthly basis. Taking name
of the employee and the Basic (monthly) pay as inputs, prepare & print a pay slip, which contains
Name, Grade, Basic monthly pay, DA, HRA, Monthly Income Tax and Net Monthly Salary, for
employee.

Question 8 [15]
Write a program in Java to accept a line of text from the user and create a new word formed out of the
first letter of each word.
E.g. Mangoes Are Delivered After Midnight
Output: MADAM

Question 9 [15]
Write a program to generate the sum of the following series

Question 10 [15]

 Area of rectangle
 Area of square
 Area of circle
Write an overloading function to display the above area in the respective functions,
calc_area (int,int) for rectangle,
calc_area (double) for square and
calc_area (float) for circle.

You might also like