SES ICSE Sem-2 Specimen Paper 2022
SES ICSE Sem-2 Specimen Paper 2022
SES ICSE Sem-2 Specimen Paper 2022
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 questions.)
Question 1
Choose the correct answers to the questions from the given options. (Do not copy the question, Write the
correct answer only.) [10]
(i) Identify the non-primitive data type from the following:
(a) Math
(b) int
(c) Scanner
(a) public
(b) private
(c) protected
(a) Integer
(b) byte
(c) String
(d) Byte
(iv) Name the method of Character class that checks whether a character given as argument is a white space
or not.
(a) isWhiteSpace( )
(b) isSpace( )
(c) hasWhiteSpace( )
(d) hasSpace( )
(a) 5
(b) 6
(c) 5.0
(d) 6.0
(a) 0
(b) 83
(c) 1
(d) -83
(vii) protected int value = 25; This instance variable can be accessed from ______________ .
(d) Other classes in the same package and subclasses of same package as well as different package
2
(viii) What is the data type of the argument given in startsWith( ) method of String class ?
(a) char
(b) boolean
(c) String
int q = c[p%c[2]];
(a) 74, 32
(b) 37, 87
(c) 10, 9
(d) 52, 37
System.out.print("Discovery".substring("Roboto".indexOf('o'), 5) ;
(c) very
(d) isco
SECTION B
(Attempt any four questions.)
Flow-Charts and Algorithms are not required.
Variable Description is mandatory.
Question 2 [10]
Define a class to input a word in lower case. Find and display the following:
• The letter with the highest ASCII value
• The letter with the lowest ASCII value
3
Question 3 [10]
Define a class to declare an array to store 10 decimal values of double type and display all the values after
removing their fractional part.
Example:
Sample Input: 1.5, 5.7, 4.78, 8.9, 5.7, 23.7, 3.05, 7.37, 12.3, 6.8
Sample Output: 1, 5, 4, 8, 5, 23, 3, 7, 12, 6
Question 4 [10]
Define a class to declare an array that can accept 20 integers from the user. Now calculate the average of
the numbers and display the numbers greater than the average as well as smaller than the average separately
with proper messages.
Question 5 [10]
Define a class to accept a line of string containing multiple words. Now eliminate the last word and display
the modified string.
Example:
Sample Input: I have a lot of books pens
Sample Output: I have a lot of books
Question 6 [10]
Define a class to accept a string containing 20 digits without any space character from the user and declare
an integer array to store 10 double-digit numbers extracted sequentially from the left-hand side of the input
string. Now ask the user to enter an element to search in the array using the technique of Linear search and
if the element is found, display the number and its position in the array, otherwise display the message
“ELEMENT NOT FOUND” (assume that, position = index + 1).
Question 7 [10]
Define a class to accept 30 words in upper case in a String array and print only those words that starts with
‘C’ and ends with ‘E’.