Wednesday, 15 April 2015

ICSE COMPUTER APPLICATION PRACTICE PAPER 1


(COMPUTER APPLICATION)
Time- 2Hrs.                                                 CLASS-X                                          MM-100
 


This paper is divided into two sections.
You are to answer 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 (40 Marks)
Attempt all questions from this Section.
Question 1:-                                                                                                                          [10]
a)      What are the two rules for naming a variable in java?
b)      Differentiate between Run-time and Compile time errors with Examples.
c)      Name any two OOP’s principles.
d)      Explain the Package with example.
e)      Give one similarity and one difference between while and do-while loop.

Question 2:-                                                                                                                            [10]
a)      Give two differences between call by value and call by reference of methods.
b)      What is the use of “Import” keyword? Explain with example.
c)      Give one word answer-
(i) Function to convert double type to String
(ii) Block to keep that part of the program which may produce the errors
d)      Explain the use of charAt() and substring() functions with the help of examples.
e)      Give two differences between Linear and Binary Search of arrays.

Question 3
a) Rewrite the given statement with if-else                                                                                  [2]
            max=(a>b && a>c)?a:(b>c)?b:c;
b) Write single line java assignment statement to evaluate the following equation-                        [2]
side=√a2+b2-2ab cos(x)
c) Given that int arr[][]={ {6,3,2},{6,7,8},{9,8,7} };                                                                [2]
            what will be the value of arr[0][2] and arr[2][2]?
d) Explain the function of each of the following-                                                             [2]
            (i) void
            (ii) extends
e)   What is the difference between public and default access specifier.                           [2]
f)        Give the output of following statements-                                                                              [2]
(i) System.out.println(Math.ceil(-12.5));
(ii) System.out.println(Math.floor(13.79));
g)      Specify output                                                                                                                    [4]
String A=”COMPUTER”;
String B=”APPLICATION”;
      System.out.println(B.indexOf(A.charAt(1)));
System.out.println(A.substring(0,3)+B,substring(7));
System.out.println(A.comareTo(B));
System.out.println( A.equals(B));
I) Consider the following code and answer the questions that follow:                              [4]
            class Student
            {
            int roll;
            String name;
            double  avg;
                        Student(int r, String n, double a)
                        {
                        roll=r;   name=n; avg=a;
                        }
            }
(i)                  Name the two instance variables.
(ii)                Name the two local variables used in the program.
(iii)               Name the function used in this program.
(iv)              Give the type of function used. 
Section –B(60 marks)
Attempt any four question from this section. Give comments or variable description or
with every answer

Quesiton 4

Define a class electricity with
member data:- cno (connection number as integer), cname (consumer name as string), ccap (connection capacity as interger),,unit ( unit consumed), bill as double.
Member function:- void readdata() //inputs cno,cname and ccap.
int mincharge() // returns the minimum bill depending upon connection capacity. If ccap is  1 kw then mincharge is Rs150, if ccap is 2kw – 3kw then mincharge is Rs300 , for ccap more  then 4 kw then mincharge will be Rs500
void calculate_bill() // calculates bill for first 100 units 1.80 Rs/unit, next 200 units 2.50 Rs/unit, above 300 units  3.20  Rs/unit. If bill is less the mincharge the mincharge is payable.
void display()// to display electricity bill in proper format.

 

Question 5

Write a menu driven program to check given number is Armstrong or not, perfect number or not, perfect square or not.
  • 153=13+53+33 is Armstrong number as sum of the cubes of its digits is equal to     original number.
  • 6=1+2+3 is perfect number as sum of its factor is same as original number.
  • 1,4,9,16 are perfect square as square root of these numbers are integers.

Question 6
Write overloaded function reverse() with following function definations.
reverse() Which takes a integer and returns its reverse.
reverse() Which takes a string  and returns reverse of it.
reverse() which takes a character and returns it in its opposite case.

 

Question 7

Write a program to input a sentence and display only those words which starts and end with same letter.

Question 8

Write a menu driven program initialize a matrix of 5x5 and find transpose of a matrix , find highest and lowest of the matrix.


Question 9.  Write a program to store the name of ten players and name of the countries for which they play in two different arrays and input the name a country and print the name of all the players who play for that country.

No comments:

Post a Comment