0% found this document useful (0 votes)
23 views10 pages

ICSE 2024 Computer Applications Exam

The document is a suggestion question paper for the ICSE 2024 examination in Computer Applications, consisting of two sections. Section A includes multiple-choice questions and short answer questions covering Java programming concepts, while Section B requires students to write Java programs based on given specifications. The paper assesses knowledge of Java syntax, data types, control structures, and object-oriented programming principles.

Uploaded by

subhra bose
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)
23 views10 pages

ICSE 2024 Computer Applications Exam

The document is a suggestion question paper for the ICSE 2024 examination in Computer Applications, consisting of two sections. Section A includes multiple-choice questions and short answer questions covering Java programming concepts, while Section B requires students to write Java programs based on given specifications. The paper assesses knowledge of Java syntax, data types, control structures, and object-oriented programming principles.

Uploaded by

subhra bose
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

ICSE 2024 EXAMINATION

SUGGESTION QUESTION PAPER

COMPUTER APPLICATIONS

Maximum Marks: 100

SECTION A
(Attempt all questions from this Section.)
Question 1 [20]
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.)
(i)

Name the feature of java depicted in the above picture.


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

(ii) The expression which uses > = operator is known as: (a) relational
(b) logical
(c) arithmetic
(d) assignment
(iii) Ternary operator is a:

(a) logical operator

(b) arithmetic operator

(c) relational operator


(d) conditional operator

(iv) When primitive data type is converted to a corresponding object of its class, it
is called:

(a) Boxing

(b) Unboxing

(c) explicit type conversion

(d) implicit type conversion

(v) The number of bytes occupied by a character array of 10 elements. (a) 20 bytes

(b) 60 bytes

(c) 40 bytes

(d) 120 bytes

(vi) The method of Scanner class used to accept a double value is:

(a) nextInt()

(b) nextDouble()

(c) next()

(d) nextInteger()

(vii) Among the following which is a keyword:

(a) every

(b) all

(c) case

(d) each

(viii) The output of [Link](6.6) + [Link](3.4) is:

(a) 9.0

(b) 11.0

(c) 10.0
(d) 11

(ix) Name the type of error, if any in the following statement:

[Link]("HELLO")

(a) logical

(b) no error

(c) runtime (d) syntax

(x) Java statement to access the 5th element of an array is:

(a) X[4]

(b) X[5]

(c) X[3]

(d) X[0]

(xi) The output of “Remarkable”.substring(6) is:

(a) mark

(b) emark

(c) marka

(d) able

(xii) Which of the following is the wrapper class for the data type char? (a) String

(b) Char

(c) Character

(d) Float

(xiii) Name the package that contains wrapper classes:

(a) [Link]

(b) [Link]

(c) java .io

(d) [Link]
(xiv) Constructor overloading follows which principle of Object Oriented programming? (a)
Inheritance

(b) Polymorphism (c)

Abstraction

(d) Encapsulation

(xv) Which of the following is a valid Integer constant:

1. 4

2. 4.0

3. 4.3f

4. “four”

(a) Only 1.

(b) 1. and 3.

(c) 2. and 4.

(d) 1. and 2.

(xvi) The method compareTo() returns __________ when two strings are equal and in
lowercase :

(a) true

(b) 0

(c) 1

(d) false

(vii) Assertion(A): In java statements written in lower case letter or upper case letter are treated
as the same.

Reason(R): Java is a case sensitive language.

(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct
explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct
explanation of Assertion(A)

(c) Assertion (A) is true and Reason (R) is false

(d) Assertion (A) is false and Reason (R) is true

(xviii) Read the following text, and choose the correct answer:

A class encapsulate Data Members that contains the information necessary to


represent the class and Member methods that perform operations on the data
member.

What does a class encapsulate?

(a) Information and operation

(b) Data members and Member methods

(c) Data members and information

(d) Member methods and operation

(xix) Assertion(A): call by value is known as pure method

Reason(R): The original value of variable does not change as operation is performed
on copied values.

(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct
explanation of Assertion (A)

(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct
explanation of Assertion (A)

(c) Assertion (A) is false and Reason (R) is true

(d) Assertion (A) is false and Reason (R) is true

(xx) What Will be the output for:


[Link]([Link]('1'));

(a) 0
(b) 1

(c) A

(d) true

Question 2

(i) Write the Java expression for (p + q)2 [2]

(ii) Evaluate the expression when the value of x = 2: [2] x = x ++ + ++ x + x

(iii) The following code segment should print “You can go out” if you have done [2] your
homework (dh) and cleaned your room(cr). However, the code has errors. Fix the code
so that it compiles and runs correctly.
boolean dh = True;
boolean cr= true; if
(dh && cr)
[Link]("You cannot go out"); else
[Link]("You can go out");

(iv) Sam executes the following program segment and the answer displayed is zero [2]
irrespective of any non zero values are given. Name the error. How the program can be
modified to get the correct answer?
void triangle(double b, double h)
{ double a; a
= ½ * b * h;
[Link](“Area=”+a); }

(v) How many times will the following loop execute? What value will be returned? [2] int
x=2; int y=50; do{ ++x; y-=x++;
} while(x<=10);
return y;

(vi) Write the output of the following String methods: [2]


(a) "ARTIFICIAL ".indexOf('I' )
(b) “DOG and PUPPY”. trim().length()
(vii) Name any two jump statements. [2]

(viii) Predict the output of the following code snippet: [2]


String a="20"; String
b="23"; int
p=[Link](a); int
q=[Link](b);
[Link](a+"*"+b);

(ix) When there is no explicit initialization, what are the default values set for [2]
variables in the following cases? (a) Integer variable
(b) String variable

(x) int P [ ]={ 12,14,16,18}; int Q[ ]={ 20,22,24}; [2]


Place all elements of P array and Q array in the array R one after the other.

(a) What will be the size of array R [ ] ?

(b) Write index position of first and last element?

SECTION B

(Answer any four questions from this Section.)

The answers 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 / mnemonic codes so that the logic of
the program is clearly depicted.

Flowcharts and algorithms are not required.

Question 3 [15]

Define a class called with the following


specifications: Class name: Eshop Member
variables:
String name: name of the item purchased
double price: Price of the item purchased
Member methods:
void accept(): Accept the name and the price of the item using the methods of Scanner
class.
void calculate(): To calculate the net amount to be paid by a customer, based on the following
criteria:
Price Discount
1000 – 25000 5.0%
25001 – 57000 7.5 %
57001 – 100000 10.0%
More than 100000 15.0 %
void display(): To display the name of the item and the net amount to be paid.
Write the main method to create an object and call the above methods.

Question 4 [15]

Define a class to accept values in integer array of size 10. Sort them in an ascending order
using selection sort technique. Display the sorted array.

Question 5 [15]

Define a class to accept a string and convert it into uppercase. Count and display the number of
vowels in it.
Input: robotics
Output: ROBOTICS
Number of vowels: 3

Question 6 [15]

Define a class to accept values into a 3×3 array and check if it is a special array. An array is
a special array if the sum of the even elements = sum of the odd elements.
Example:
A[][]={{ 4 ,5, 6}, { 5 ,3, 2}, { 4, 2, 5}};
Sum of even elements = 4+6+2+4+2 =18
Sum of odd elements= 5+5+3+5=18
Question 7

Define a class to accept a 3 digit number and check whether it is a duck number or not. [15] Note:
A number is a duck number if it has zero in it Example1:
Input: 2083
Output: Invalid
Example 2:
Input: 103
Output: Duck number
Question 8 [15]

Define a class to overload the method display as follows:


void display(): To print the following format using nested loop
1
12
123
1234
12345
void display(int n): To print the square root of each digit of the given number
Example: n = 4329
output – 3.0
1.414213562
1.732050808
2.0

You might also like