Wednesday, 15 April 2015

ICSE COMPUTER APPLICATION PRACTICE PAPER 2

Sample Paper – 2011
Class – X
Subject –
Computer Applications
Time: 2 Hrs.                                                                                                                           FM: 100    

This paper is divided into two Sections
Attempt all questions from Section – A and any four from Section – B
The intended marks for each question is provided within the ( )

Section – A (40 Marks)
Attempt all questions from this section
Question 1                                                                                                                                              (2x5=10)

a)      Name any two types of Java programs.
b)      State the difference between a Constructor & a Method.
c)      What does the following mean? Also state the significance of the constant ‘99’.
      Ferrari F50 = new Ferrari (99);
d)      State the difference between an ‘Instance Variable’ & ‘Class Variable’
e)      What is a Wrapper class? Give 2 examples.

Question 2                                                                                                                                              (2x5=10)

a)      Differentiate between ‘Operator’ & ‘Expression’
b)      What is the value of ( (1.0 / 0.0) – (1/ – 0.0) ).
c)      Give one difference & one similarity between ‘switch case’ and ‘if…else’.
d)      How many times does the loop iterate? Also give the output for the following code snippet.
      int x;
      for(x = 1; x< =10; x + +)
       {
          x + +;
          System.out.println(x + +);
       }
e)      What is the difference between ‘= =’ and ‘equalsIgnoreCase( )’

Question 3                                                                                                                                              (2x5=10)

a)      If the value of a = 3, what does the expression below evaluate to,
       a + = a + + + + + a + a;
       System.out.println (a);

b)      Find error in the following code snippet,
      int a; b ;
      for (a=1; b=1;a<=10;a++;b++)
       { …
          <Statements>
        …}

c)      Give the output after invocation of the following method,
        i. x (28,29)
        ii. x (27,39)

      public boolean x (int a, int b)
       {
          boolean c = false;
          while (a>1 && b>1)
             {
                  if (a>b)
                  a – = b;
                  else
                  b – = a;
              }
          if (a = = 1 || b = = 1)
          c = true;
         
          return c;
      }
     
d)      Evaluate the following if the value of n = 400,
       n – –; 
       m = n= =399?3:99;
Transform the above Conditional Statement into if…else statement.

e)      What is the output of the following
      char chars [ ] = {‘c’, ‘h’, ‘a’, ‘r’};
      String s = new String (chars);
      String strng = s;
      System.out.print (strng);
      System.out.print (strng.concat(“s”));

Question 4                                                                                                                                              (2x5=10)

a)      i. Write the Java expression for the following: y = tan (log (Ö13x9 ) )
      ii. Evaluate the following if the value of x = 10 and y = 21,
          System.out.println (Math.sqrt((Math.pow((double)(Math.abs(Math.max(Math.min(x, y),y))),4))));

b)      int x = 10, y = 21;
          System.out.println(x&y);
          System.out.println (x|y);
          System.out.println(x/y);
          System.out.println(x>>(y – x – x));

c)      String s1 = “MINORITY”;
      String s2 = “REPORT”;
i.        System.out.println(s1.substring(0,3).concat(s2.substring(3,5))
ii.      System.out.println(s2.substring(2));
iii.    System.out.println(s2.replace(‘p’ , ‘s’));
iv.    System.out.println(s1.charAt(s1.indexOf(‘R’) + s2.indexOf(‘R’)));

d)      Give any three uses of break statement.

e)      How are the following passed to a method?
i)        Primitive type
ii)      Reference type

Section – B (60 Marks)
Attempt any four questions from this section
The answers in this section should consist of programs in either Blue – J environment or any other environment with Java as the base. Each program should be written using Variable Description / Mnemonic Codes such that the logic of the program is clearly depicted.
Flowcharts and Algorithms NOT required
Question 5                                                                                                                                           [15]

Write a program to enter a line of text from the user, extract each word and put them inside a String type array and sort the array in alphabetical order (Lexicographically) and re-display the array elements. 

Question 6                                                                                                                                           [15]

Write a program to input multiple digited numbers in a single subscripted array of size 10 in the main ( ) method. Pass the array into a function named void remove_sort( ) that will remove the zeros from each array element and sort the array elements in  ascending order using Selection Sort Technique, and re-display the elements within the same method.
Question 7                                                                                                                                           [15]

A company has employees, who are divided into four grades depending on their Basic pay per month as follows,
Basic(Rs./month)              Grade                             DA                         HRA

10,001 or more                      1                                 40%                       30%
5,001 to 10,000                     2                                 40%                       25%
2001 to 5,000                       3                                 30%                       20%
2,000 or less                          4                                 30%                       15%

If the Net salary which is the total of Basic, DA, and HRA, is above Rs.50, 000 per month then Income Tax at the rate of 30% of the annual salary exceeding 50,000 is deducted on monthly basis. Taking name of the employee and the Basic (monthly) pay as inputs, prepare & print a pay slip, which contains Name, Grade, Basic monthly pay, DA, HRA, Monthly Income Tax and Net Monthly Salary, for employee.

Question 8                                                                                                                                           [15]

Write a program in Java to accept a line of text from the user and create a new word formed out of the first letter of each word. After creating the new word reverse it and check whether it is a Palindrome or not.
E.g. If the user enters Mangoes Are Delivered After Midnight
Output: MADAM
Reverse: MADAM
Yes, it is a Palindrome

E.g. If the user enters A Brick In The Wall
Output: ABITW
Reverse: WTIBA
No, it is not a Palindrome

Question 9                                                                                                                                           [15]

1.      Write a program to generate the sum of the following series
        




2.      Write a program to generate the following pattern

                                    A *
                                    B *C *
                                    D *E *F *
                                    G *H *I *J *
                                    K *L *M *N *O *

Question 10                                                                                                                                         [15]

Create overloaded methods named void calc_volume ( ), that has been overloaded to perform the following functions

·         Volume of Sphere
·         Volume of Cylinder
·         Volume of Cone

            Write a menu driven program in Java to display the above 3 menus and execute the overloaded methods        and display the volume in the respective functions,
            calc_volume (double) for sphere,       
            calc_volume (double, double) for cylinder and
            calc_volume (float, float) for cone.




No comments:

Post a Comment