Icse 10 2024
Icse 10 2024
GROUP-A
1. The concept of Abstraction is
(a) Binding data and functions together
(b) Hiding inner complexity and providing usable interfaces
(c) Reusing of the code
(d) Making methods constant
2. Java supports
(a) Single Inheritance (b) Multilevel Inheritance (c) Multiple Inheritance
(d) Both a and b
3. Code reuse is implemented by :
(a) Abstraction (b) Function overloading (c) Inheritance (d) Polymorphism
4. Which of the following statements are true?
(a) An abstract class may not have any final methods.
(b) A final class may not have any abstract methods.
(c) Transient variables must be static.
(d) All of the above
5. What do you mean by nameless objects?
(a) An object created by using the new keyword.
(b) An object of a superclass created in the subclass.
(c) An object without having any name but having a reference
(d) An object that has no reference.
6.Data hiding is implemented by
(a) Access specifiers (b) Static variables (c) Inheritance (d) None
7.The statement to create an object of class student in Java is :
(a) obj= create Object();(b) obj=new Student();
(c) obj=new object(Student); (d) None of the above
18. Out of these methods, which one can be used for converting all the characters present in a
String into an Array of characters?
a. both getChars() & toCharArray()
b. both charAt() & getChars()
c. charAt()
d. all of the mentioned
19.Where does the String Pool get stored?
a. Metaspace
b. Java Stack
c. Java Heap
d. Permanent Generation
20.Out of the following, which one is a superclass of all the exception type classes?
a. String
b. RuntimeExceptions
c. Catchable
d. Throwable
21.The method to determine whether the specified char value is in uppercase or not.
a)toUpperCase(char) b)toLowerCase(char)
c)isLowerCase(char) d)isUpperCase(char)
22.Assertion (A) Method should be called explicitly either with object reference or class reference.
Reason (R) Method can be any user defined name.
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.
23.Evaluate the following expressions, when int a = 8, b = 14.
(a) b/a++ (b) --a + b-- + a
24.Find the value of ++a * (a++ + 5) + 3 * --a, if a = 12.
25.What will be the output of the following code?
int num = 10;
if (num < 20)
System.out.print(num++);
else
System.out.print(--num);
26.Find the output of the given code.
int a, b = 100;
for (a = 10; a <= 12; a++)
{
b += a;
}
System.out.print("a:" + a + " " + "b:" + b);
27.The following code has some error(s). Identify the errors and write the corrected code.
Int x = 4, y = 8;
{
y = y + (x++)
} while (x <= 10)
System.out.println(y);
28.State the method that determines, if the specified character is an uppercase character.
29.Write the return data type of the following functions.
(a) startsWith( ) (b) log( )
30.State the type of errors, if any in the following statements.
a. switch (x < 2)
b. int a = 100, b = 0;
System.out.println (a / b);
GROUP B
void display() – To display customer name, mobile number, amount to be paid after discount
Write a main method to create an object of the class and call the above member methods.
2.Write a program to accept name and total marks of N number of students in two single subscript array
name[ ] and totalmarks[ ].
Calculate and print :
(i) The average of the total marks obtained by N number of students.
[average = (sum of total marks of all the students)/N]
(ii) Deviation of each student's total marks with the average.
[deviation = total marks of a student - average]
3.Define a class to accept a number and check whether the number is valid number or not. A valid
number is a number in which the eventual sum of digits of the number is equal to 1.
e.g., 352 = 3 + 5 + 2 = 10 = 1 + 0 = 1
Then 352 is a valid number.
4. Define a class Anagram to accept two words from the user and check whether they are anagram of
each other or not.
An anagram of a word is another word that contains the same characters, only the order of characters is
different.
For example, NOTE and TONE are anagram of each other.
5.Design a class to overload a function series() as follows: [15]
(a) void series (int x, int n) – To display the sum of the series given below:
x1 + x2 + x3 + ……………. xn terms
(b) void series (int p) – To display the following series:
0, 7, 26, 63 p terms.
(c) void series () – To display the sum of the series given below: