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

ICSE Class X Computer Application Exam

This document is an examination paper for ICSE Class X Computer Applications, consisting of two sections: Section-A with multiple-choice questions and Section-B requiring programming tasks. Students are instructed to write their answers on separate paper and spend the first 15 minutes reading the questions. The paper tests knowledge on Java programming concepts, data types, and class design.

Uploaded by

dibyajotihalder4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

ICSE Class X Computer Application Exam

This document is an examination paper for ICSE Class X Computer Applications, consisting of two sections: Section-A with multiple-choice questions and Section-B requiring programming tasks. Students are instructed to write their answers on separate paper and spend the first 15 minutes reading the questions. The paper tests knowledge on Java programming concepts, data types, and class design.

Uploaded by

dibyajotihalder4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SUBJECT: COMPUTER APPLICATION

SET: 1
BOARD: ICSE CLASS: X FULL MARKS: 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.
Thins 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

The Question 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
(Attempt all the questions from this Section)
Question-1 [20x1=20]
Choose the correct answer and write the correct option
(Do not copy the question, write the correct answer only)
i. What does the image showcasing regarding the feature of OOP?

a) Polymorphism b) Encapsulation c) Inheritance d) Abstraction


ii. The data type which is specified method does not return any value.
a) int b) void c) null d) boolean
iii. Identify the operator that gets highest precedence for the given expression: w – x % y * z
+a
a) + b) % c) - d) *
iv. What is the value of “computer”.indexOf(‘o’)? a) 0
b) 1 c) 2 d) 3
v. Consider the array and predict the output of the following :
char ch[]={‘a’, ‘e’, ‘i’, ‘o’, ‘u’}; [Link](ch[0]*2);
a) 97 b) 194 c) ‘a’ d) 0
vi. boolean k = (8 < 5) ? false : true; The output would be
a) true b) false c) 0 d) Syntax error

vii. [Link]() is a
a) user-defined method b) static method c) neat method d)
method which returns Integer
viii. The number of bits occupied by the constant value 'A' is
a) 8 b) 16 c) 1 d) 64
ix. The return type of [Link]() is
a) double b) int c) depends upon the arguments d) float
x. Which access specifier is visible to classes in the same package only?
a) protected b) default c) private d) public
xi. Choose the correct option:
a) A data member which is static is an instance variable
b) Instance variable shared by all instances
c) A non-static member method does not require an object
d) A static data member value shared by all instances
1
xii. [Link](144, ) + [Link](121) = ?
2
a) 23 b) 33 c) 30 d) None
xiii. Evaluate the following java expression, if x=3, y=5 and z=10:
++z+y- --y+z+x++
a)24 b)23 c)20 d)25
xiv. The output of the following code is:
int i;
for(i=5;i>=1;i--)
{if(i%2==1)
continue;
[Link](i);}
a)4 0 b) 3 2 c)3 1 d)4 2
xv. for(int k=1;k<=2;k++)
{ for(int m=1;m<=4;m++)
{ [Link](m*2);}}
How many times the inner loop is executed?
a)4 times b)8 times c)2 times d)16 times
xvi. Assertion(A): In Java, no two identifiers can use the same name.
Reason(R): Identifiers are case sensitive.
a) Both A and R are true and R is the correct explanation of A.
b) Both A and R are true and R is not the correct explanation of A.
c) A is true and R is false.
d) A is false and R is true.
xvii. Give the output of the following:
int a,b=10;
a=15/3*b;
[Link](“a=” +a);
a) 50 b)49 c)53 d)52
xviii. The output of the code will be:
public class mystring{
public static void main(String [] args){
String s=new String (“FIT515”);
[Link]([Link]()+10+[Link]([Link](3)));
}}
a)521 b)539 c)530 d)531
xix. A program segment is as follows:
char a;
a=”tdmalhotra”.charAt(4);
What will be the result of the segment?
a)m b)1 c)a d)none of these
xx. Assertion(A): Constructor is invoked at the time of instantiation of an object.
Reason(R): Constructor cannot be called explicitly like a regular of an object.
a) Both A and R are true and R is the correct explanation of A.
b) Both A and R are true and R is not the correct explanation of A.
c) A is true and R is false.
d) A is false and R is true.
Question-2 (Do not copy the question, write the correct answer only) [10x1=20]
i. Predict the output
int i = 5;
do {
[Link](++i - 5);
} while (++i < 11);
[Link](i);
ii. If
int n[] = {1, 2, 3, 5, 7, 9, 13, 16};
What are the values of x and y?
x = [Link](n[4], n[2]);
y = [Link](n[5] + n[7]);
iii. Predict the output
int a[] = {5, 1, 15, 20, 25};
int i, j, m;

i = ++a[1];
j = a[2]++;
m = a[i + j];
[Link](i + " " + j + " " + m);
iv. Differentiate between actual and formal parameter.
v. Write a Java expression for the equation:
Ax²⁰ + By¹²( √z + 4 )
vi. Predict the output:
public class mystring{
public static void main(String [] args){
String obj=”circus”;
String obj1=”Atmosphere”;
String obj2=”circus”;
[Link]([Link](obj1)+”@”+[Link](obj2));
}}
vii. Predict the output
String s1=”phoenix”;String s2=”island”;
[Link]([Link](0).concat([Link](2)));
[Link]([Link]());
viii. Rewrite the following using ternary operator:
if (bill > 10000)
discount=bill*10.0/100;
else
discount=bill*5.0/100;
ix. Rewrite the following program after removing the errors
class Main
{ public static int main(String[] arg)
{ int num = 1234, reversed = 0;
[Link]("Original Number: " + num);
while(num == 0)
{int digit = num % 10;
reversed = reversed + digit*10;
num =/ 10;}
[Link]("Reversed Number: " + reversed); }

x. Rewrite the following program using do while:


class Number
{
public static void main(String args[])
{
int i,n=191,c=0;
for(i=1;i<=n;i++)
{
if(n%i==0)
c=c+1;
}
if(c==2)
[Link]("Prime");
else
[Link]("Not Prime"); }}

Section-B
(Attempt any four Question questions from this Section)
The answer in this section should consist of the programs in either BlueJ environment or
any program environment with java as the base.
Each program should be written using variable description/mnemonics code so that the
logic of the program is clearly depicted.
Flowcharts and algorithms are not required.
Buffered Reader / Data Input Stream should not be used in the programs.

Question-3 [15]
Design a class name “ShowRoom” with the following description. Also write a main() method to
create an object of the class to invoke all the member methods.
Data members/instance variable:
String name : To store the name of the customer
long mobno : To store the mobile number of the customer
double cost : To store the cost of the items purchased
double dis : To store the discount amount
double amount : To store the amount to be paid after discount
Member methods:
ShowRoom() : Default constructor to initialize data member
void input() : To input customer name, mobile number and cost
void display() : To display customer name, mobile number, amount to be paid after
discount
void calculate() : To calculate discount on the cost of purchased items, based on following
criteria:
Cost Discount (in percentage)
Less than or equal to Rs 10000 5%
More than Rs 10000 and less than or equal to Rs 20000 10%
More than Rs 20000 and less than or equal to Rs 35000 15%
More than Rs 35000 20%

Question-4 [15]
Write a program to define a class overload with the three member function name “perimeter”-
i)void perimeter(double r) – to calculate perimeter of a circle.
ii) void perimeter(int a, int b, int c) – to calculate perimeter of a triangle.
iii) void perimeter(int side) – to calculate perimeter of a square.

Question-5 [15]
Define a class to accept a number and check whether it is a Peterson number or not. Peterson
Number is a number whose sum of factorial to it’s digits are equal to the original number.
Example 1: 145. 1!+4!+5! = 1+24+120 = 145. Hence it is a Peterson Number.
Example 2: 415. 4!+1!+5! = 24+1+120 = 145. Here the result is not equal to the original number.
Hence it is not a Peterson Number.
Question-6 [15]
Write a program to declare a double data type array of size 20. And sort the array in descending
order.
Question-7 [15]
Define a class to accept values into an integer array of order 4x4 and check whether it is a
DIAGONAL array or not.
An array is DIAGONAL, if the sum of left diagonal elements equal to the sum of right diagonal
elements. Print the proper message.
Sample Input:
3425
2523
5327
1371
sum of left diagonal elements:11
sum of right diagonal elements: 11
Output: This array is DIAGONAL array.

Question-8 [15]
Define a class to accept a string and convert it into uppercase, if it is in lowercase. Display the
new string by replacing each vowel by immediate next character. The other characters remain
the same.
Example:
Input: #Computer@2025
Output: #CPMPVTFR@2025

You might also like