ICSE Guess Paper Computer Application Class – X (2010) [Set-2]

Guess Paper – 2010

Class – X

Subject – Computer Application

This paper is divided into two sections. Attempt all questions from Section A and any four from Section B.

Section A

Q1. a). What is instantiation? Name the variable which has no data type?                          [2]

b). What is initial class and abstract class? Write the keyword by which subclasses are created from the super class?            [2]

c) Write any two rules for naming variable.                [2]

d) What is difference between Literals and Identifiers.         [2]

e). What is the minimum and maximum size of short data type?                [2]

Q2. a). Explain the function of the following with its syntax and an example :

  1. do -while
  2. switch statement                                 [2]

b) What is the value of (1/1.0)-(1/-1.0)                      [2]

c). A class is known as composite data type as it is based on fundamental data type.

Example: class Date

              {

       int date, month, year;

             }

So now if we create an object of “Date” type, it will contain all the three integer data i.e. date, month and year.                [2]

d). A function which receives an object parameter and modifies state of it, is known as impure function whereas a function which receives an object as parameter and does not modifies its state is known as pure function.                          [2]

e). Differentiate between static and non-static members.                    [2]

Q3. a) Write True / False for the following statements:                [5]

              1. && is relational operator.

              2. Float stores 4 bytes of data

              3.

character is used for new line

              4. The keywords are reserve words.

              5. Java is of dual utility.

b) Read the following program and answer the given questions :

class demo

      {

          public void main( )

           {

             int a,b,i,j;

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

             {

              for(j=1;j<=I;j=j+1)

              {

              System.out.print(“ “+j);

              }

          System.out.println( );

          }

       }

}

(i) How many times the first loop of i will perform?                 [1]

(ii) How many times the first print statement work ?              [1]

(iii) What will be the output of program ?                                [3]

Q4. a). Explain the bubble sorting technique in array with an example.                                                  [6]

b). What is difference between single dimensional array multidimensional array                                   [4]

SECTION B ( 60 MARKS )

Attempt any four

Q5. Create class Sortsearch where the data members and methods are as follows:-

Instance variables : int arr[ ] , no Methods:

void accept() : Accept n numbers from the user.

void sort() : Sort the numbers in ascending order either using selection sort logic

void disp() : Display the original and sorted array                                                       [15]

Q6. a). Create a class to print the following output :                                            [7]

12345

2345

345

45

5

b). Create a class to print the following output :                                                   [8]

54321

4321

321

21

1

Q7. import java.io.*;                                                                   [15]

public class Q5

{

  void input() throws IOException

   {

     BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

     int ch, n, i, j;

     System.out.println("Type 1 for a triangle and");

     System.out.println("type 2 for an inverted triangle");

     System.out.print("Enter your choice :");

     ch=Integer.parseInt(br.readLine());

     if(ch==1)

      {

        System.out.print("Enter the number of terms ");

        n=Integer.parseInt(br.readLine());

        System.out.println("Output:");

           for(i=1; i<=n; i++)

             {

                 for(j=1; j<=i; j++)

                     {

                   System.out.print(i);

                     }

                System.out.println();

             }

    }

   else if(ch==2)

    {

     System.out.print("Enter the number of terms ");

     n=Integer.parseInt(br.readLine());

     System.out.println("Output:");

     for(i=n; i>=1; i--)

       {

         for(j=1; j<=i; j++)

            {

            System.out.print(i);

            }

         System.out.println();

       }

   }

else

   System.out.println("Wrong input");

}

}

Q8. Write a menu driven program to invoke the following functions:

i) sortWeekDays() – print the names of the seven days of the week in a descending order of alphabets using the selection sort technique.

ii) isaBuddyPair(int x, int y) – finds whether the two numbers are amicable.                           [15]

Q9. Input a number from the user and check whether it is perfect square or not. If not, find next possible perfect square number and print the same. If input is 67, the output should be 81, where as there will be no change in output if input is 49 since it is a perfect square.                            [15]