Back to Tutorials
Sample PapersICSEClass 10Computer Applications

ICSE computer applications sample paper

Trushna Tejwani6 January 2023
Sample Papers

<tbody>

ICSE

Java

computer applications

Class: X

Pre Board Examination Dec ’22

Date:  30/12/22

Max Marks: 100

Subject: Computer

Max. Time 2 hours

</tbody>

_________________________________________________________________________

SECTION A

(Attempt all questions from this Section)

Question 1    Choose the correct answer and write the correct option.             [20]

  1. _________ is the blueprint that can produce multiple objects with common

characteristics and behaviour.

  1. Object
  2. Class
  3. Data member
  4. Function
  5. The escape sequence for New line is :
  6. \t
  7. \b
  8. \n
  9. \”
  10. The code that is obtained after the compilation of the java program is :
  11. Byte code
  12. Source code
  13. Java Virtual machine
  14. Object code
  15. The size of a float data type is:
  16. 4 bytes
  17. 8 bits
  18. 4 bits
  19. 8 bytes
  20. What will be the value of  variable ‘val’ when the following statement is

executed?

    val = (char) 50;

  1. ‘A’
  2. 2
  3. “50”
  4. ‘2’
  5. What will be the value in variable ‘n’ when the following code is executed?

int x=67;

    char n=(x<=67) ? ‘C’ : ‘B’ ;

  1. ‘B’
  2. 66
  3. ‘C’
  4. true
  5. What will be value returned by the following statement ?

Double.toString(Math.cbrt(27));

  1. 9
  2. 3.0
  3. “3.0”
  4. “3”
  5. The statement that will be executed when there are no matching cases in a                        switch-case is:
  6. break
  7. default
  8. continue
  9. condition
  10. Which of the following is an exit-controlled loop?
  11. switch-case
  12. while ()
  13. for()
  14. do-while()
  15. The following is an example of which kind of loop?

int x=10;

      while(x++ >= 10)     

    {    System.out.println(x);}

  1. do-while() loop
  2. infinite loop
  3. for() loop
  4. time-delay
  5. The keyword used to declare a class variable is :
  6. class
  7. public
  8. static
  9. void
  10. What will Character.toUpperCase(‘b’) return?
  11. ‘B’
  12. “B”
  13. “b”
  14. 66
  15. What will be the output of 100 / 9?
  16. 11.1
  17. 11
  18. 9.99
  19. 1
  20. Which of the following is not applicable for a constructor?
  21. It is used to update the member variables with legal values.
  22. It has no return type, not even void.
  23. It is invoked by making a function call using an object.
  24. It will have the same name as class.
  25. The method of calling a function in such a way that the change in the formal

arguments reflects in the actual parameter also is known as :

  1. Call by value
  2. Call by method
  3. Call by reference
  4. None of the above
  5. What will be the output when the following statements are executed?

if (“AMIT” . compareTo (“AMAN“) > 0)

        System.out.println(“AMIT”) ;

      else

        System.out.println(“AMAN”);

  1. 8
  2. -8
  3. AMAN
  4. AMIT
  5. Which of the following is a composite data type?
  6. static char n;
  7. class Student
  8. int j;
  9. static boolean b;
  10. The output of  “Lemonade”. indexOf (‘e’, 3); is :
  11. 1
  12. ‘e’
  13. 3
  14. 7
  15. If String s = “Computer Applications”, what will be the output of : s.substring(5,12);

(a) “terAppl”

    (b) “ter Appl”

    (c) “ter App”

    (d) “Comput”

  1. What is the result produced by 2-10*3+100/11?

(a) -1

(b) 33

(c) -15

(d) -19




Question 2

  1. If a=5, b=9 calculate the value of a+=a++ - ++b +a
  2. What will be the value of x after the execution of the following expression?

x=10 and y=20

x=x>y?10:y+2;

  1. Write a java expression for the following.

√3x+x2/a+b

  1. If int X[]={4,3,7,8,9,10}; What will be the value of p and q?

p=X.length

q=X[2]+X[5]*X[1]

  1. Differentiate local variable and Instance variable (Write two points each).
  2. String x[]={“SAMSUNG”, “NOKIA”, “SONY”,”MICROMAX”, “BLACKBERRY”};

Give the output of the following statements:

System.out.println(x[3]);

System.out.println(x[4].length);

  1. What will be the final value of ctr when the loop given below executes

int ctr=0;

for(int i=1;i<=5;i++)

for(int j=1;j<=5;j+=2)

++ctr;

  1. Convert the following if else statement in to switch case.

if(val==1)

System.out.println(“good”);

elseif(val=2)

System.out.println(“better”);

elseif(val==3)

System.out.println(“best”);

else

System.out.println(“invalid”);

  1. Give the output of the following

Math.pow(36, 0.5)+ Math.cbrt(125)

Math.ceil(4.2)+Math.floor(7.9)

  1. Write the output of the following.

String S1=”Life is beautiful”;

System.out.println(“Earth”+S1. substring(4));

System.out.println(S1. indexOf(‘i’));



Section B (60 Marks)

Answer any four questions from this Section(15X4=60 marks)

The answers in this Section should consist of the Programs in either Blue J environment or any program environment with Java as the base. Each program should be written using Variable descriptions/Mnemonic Codes so that the logic of the program is clearly depicted. Flow-Charts and Algorithms are not required. 



Question 3

Define a class BookFair with the following members :

Data members/Instance variables :

String bName – Stores the name of the book

double price - Stores the price of the book

Member functions :

void input() – Inputs and stores the name and price of the book

void calculate()-Calculates the price after discount.

Discount is calculated based on the following criteria:

<tbody>

Price

Discount

Less than or equal to Rs.1000

2%

More than Rs.1000 and less than or equal to Rs.3000

10%

More than Rs.3000

15%

</tbody>

void display() – to display the name and price of the book after discount.

Write a main() method to create an object of the class and call the above methods.       [15]



Question 4

Write a program in java to accept a word from the user and check and display whether the word is a Palindrome or not. Palindrome is a word that reads the same from left to right and vice versa. (Ex.MALAYALAM, LEVEL etc.)                                           [15]

 

Question 5

Write a program to perform function overloading as follows:

  1. a) myfunction() – It displays the following pattern.

1

12

123

1234

12345

  1. b) myfunction(String)-accepts a string and checks if the word is a special word or not

Special words are those which start and end with the same alphabet. (Ex. EXISTENCE, COMIC etc)

  1. c) myfunction (int)- accepts a number from the user and check whether it is a Perfect number.

(A number is a perfect number if the sum of all it’s factors, except itself, gives back the number. Ex. 28 is a perfect number as it’s factors are 1, 2, 4, 7 and 14, and if you add them you will get back 28.)    



Question 6

Write a program to accept 10 numbers in an array and sort it in ascending order using bubble sort.



Question 7

Write a program to accept the year of graduation from school as an integer value from the users . Using the Binary search technique on the sorted array of integers given below . Output the message “record exists" if the value input is located in the array and if not output the message record does not exist”.

{1982, 1987 ,1993, 1996 ,1999, 2003, 2006 ,2007 ,2009, 2010,}



Question 8

Write a program that creates integer array of 10 elements, accepts values of arrays and Find Sum, Average, Minimum and Maximum element.