Wednesday, June 10, 2015

ICSE Computer Applications 2015 Board Paper

ICSE Java Complete Reference book is currently available as print on demand and can be bought from online stores. Please check the discounts offered by different websites. fourth edition of book (2015 release) includes 2015 board paper solution.


Good news!!


Discount is offered on 25+ copies. For more details write to info@pothi.com 

Additionally: Complimentary shipping for 25+ copies in a single order to a single address within India.
Note: No further negotiation in terms of discount will be possible with Pothi.com as  discounts are standard.


1.    Pothi.com:
2.    infibeam :
3.    flipkart : 
4.    homeshop18 : 
5.    Amazon India : 
6.    dial a book : 


ICSE Paper – 2015
Class – X
Subject – Computer Applications
             

 (Class: X)                                                                          (Two Hours)

Answer to this paper must be written on the paper provided separately.
This paper is divided into two sections.
Attempt 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.


Question 1.                                                                                        [2x5=10]
a) What are the default values of primitive data type int and float.                       
b) Name any two OOPs principles.                                                                                                      

c) What are identifiers?               
d) Identify the literals listed below:                                        
      i) 0.5     ii)  ‘A’         iii) false       iv) “a”        
e) Name the wrapper classes of char type and Boolean type.
               

Question 2.                                                                                        [2x5=10]
a)  Evaluate the value of n if value of p=5, q=19.                                         
          int n = (q-p)>(p-q)?(q-p) : (p-q);

b) Arrange the following primitive data types in an ascending order or their size:  
i) char          ii)  byte        iii) double    iv) int

c) What is the value stored in variable res given below:
          double res = Math.pow(“345”.indexOf(‘5’), 3);
d) Name the two types of constructors.
e) What are the values of a and b after the following function is executed, if the values passed are 30 and 50;
void paws(int a, int b)
{
          a = a + b;
          b = a – b;
          a = a – b;
          System.out.println(a+ “,”+b);
}
                            

Question 3.                                                                               [2x10=20]

a) State the data type and value of y after the following is executed.
char x = ‘7’;
y = Character.isLetter(x);

b) What is the function of catch block in exception handling? Where does it appear in a program?
 c) State the output when the following program is executed?
                String a = “Smartphone”, b = “Graphic Art”;
                String h = a.substring(2,5);
                String k = b.substring(8).toUpperCase();
                System.out.println(h);
                System.out.println(k.equalsIgnoreCase(h));

                            
 d) The access specifier that gives the most accessibility is ________ and the least accessibility is _____________.                                          
         
 e)  (i)  Name the mathematical function which is used to find sine of an angle given in radians.
         (ii) Name a string function which removes the blank spaces provided in the prefix and suffix of a string.
               
  f)  (i)  What will this code print ?
          int arr[] = new int[5];
          System.out.println(arr);
i) 0          ii) value stored in arr[0]      iii) 0000                 iv)  garbage value

         (ii) Name the keyword which is used to resolve the conflict between method parameter and instance variables /fields.

 g)  State the package that contains class:
(i) BufferedReader.
                (ii) Scanner.

 h) Write the output of following program code:    
char ch;                                            
                int x = 97;
                do   
                {
                   ch = (char)x;
                   System.out.println(ch + “ ” );
                   if(x % 10 == 0)                    
                      break;             
              ++x;
  } while (x <= 100);


 i) Write the java expression for :   
a2 + b2
 2ab                                       

j)  If int y=10 then find int  z = ( ++y * (y++ +5) );                             
               
               
               
                         
SECTION B (60 Marks )
Attempt any four questions from this Section.
The answers in this section should consist of the program in Blue J environment with Java as the base. Each program should be written using Variable descriptions / Mnemonics Codes such that the logic of the program is clearly depicted.
Flow-charts and Algorithms are not required.


Q4. Define a class called ParkingLot with the following description:     [15]
          Instance variables/data members:
          int vno        - to store the vehicle number
          int hours        - to store the number of hours vehicle is parked.
          double bill             - to store the bill amount
         
          Member Methods:
          void input()                    - to input and store the vno and hours.                                
          void calculate()      - to compute the parking charge at the rate of Rs3 for the first hour of part thereof , and Rs 1.50 for each additional hour of part thereof.         
void display()        - to display the details:        
              
Write a main method to create an object of the class and call the above member methods.

Q5. Write two separate programs to generate following pattern using iteration (loop) statements.                                                                                         [15] 
a)     *                                                       b) 5 4 3 2 1
* #                                                         5 4 3 2
* # *                                                      5 4 3
* # * #                                                   5 4
* # * # *                                                 5             

Q6. Write a program to input and store roll numbers, name and marks in three subjects of n number of students in five single dimentional array and display the remark based on average marks as given below:                                        [15]   (The maximum marks in the subject are 100)       

Average marks = total marks / 3         

Average marks                                   Remarks
85 – 100                                             Excellent
75 – 84                                              Distinction
60 – 74                                              First Class
40 – 59                                              PASS
Less than 40                                                POOR         

Q7. Design a class to overload a function Joystring() as follows:           [15]                      
(i) void Joystring(String s, char ch1, char ch2) with one string argument and two character arguments that replaces the character argument ch1 with the character argument ch2 in the given string s and prints the new string.

Example: Input value of s = “TECHNALAGY”
Ch1 = ‘A’ and ch2 = ‘O’
Output = “TECHNOLOGY”
         
(ii) void Joystring(String s) with one string argument that prints the position of the first space and the last space of the given string s.
Example: Input value of s = “Cloud computing means Internet based computing”
Output:
First index: 5  
Last index: 36

(iii) void Joystring(String s1, String s2) with two string arguments that combines the two strings with a space between them and prints the resultant string.
Example:
Input value of s1 = “Common Wealth”
Input value of s2 = “Games”
Output: Common Wealth Games
(Use library functions)

            
Q8. write a program to input twenty names in an array. Arrange these names indescending order of alphabets, using the bubble sort technique.            [15]                      
     
Q9. Using switch statement, write a menu driven program to:             [15]
i)                   To find and display all the factors of a number input by the user (including 1 and excluding number itself ).
Example: Sample input n = 15
                        Sample output: 1, 3, 5

ii)                To find and display factorial of a number input by the user ( the factorial of a non-negative integer n, denoted by n!, is the product of all integers less than or equal to n.
Example: Sample input: n = 5
Sample output:  5! = 1x2x3x4x5 = 120
For an incorrect choice , an appropriate error message should be displayed.


Saturday, March 15, 2014

ICSE computer applications 2014 board paper


ICSE Java Complete Reference book is currently available as print on demand and can be bought from online stores. Please check the discounts offered by different websites. third edition of book (2014 release) includes 2014 board paper solution.


Good news!!


Discount is offered on 25+ copies. For more details write to info@pothi.com 

Additionally: Complimentary shipping for 25+ copies in a single order to a single address within India.
Note: No further negotiation in terms of discount will be possible with Pothi.com as  discounts are standard.


1.    Pothi.com:
2.    infibeam :
3.    flipkart : 
4.    homeshop18 : 
5.    Amazon India : 
6.    dial a book : 


ICSE Paper – 2014
Class – X
Subject – Computer Applications
             

 (Class: X)                                                                          (Two Hours)

Answer to this paper must be written on the paper provided separately.
This paper is divided into two sections.
Attempt 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.


Question 1.                                                                                        [2x5=10]
a) Which of the following are valid comments?                           
i)                   /* comment */
ii)                /* comment
iii)              // comment
iv)              */ comment */
b) What is meant by a package? Name any two Java Application Programming Interface packages.                                                                                                                      
c) Name the primitive data type in Java that is:                                        
             i)    a 64 bit integer and is used when you need a range of values wider than those provided by int.
             ii)   a single 16 bit Unicode character whose default value is ‘\u0000’.
d) State one difference between floating point literals float and double.         
e) Find the errors in the given program segment and re-write the statements correctly to assign values to an integer array.                                  
          int a = new int (5) ;
          for(int i=0;i<=5:i++)a[i]=i;             

Question 2.                                                                                        [2x5=10]
a)  Operators with higher precedence are evaluated before operators with relatively lower precedence. Arrange the operators given below in order of higher precedence to lower precedence.                                         
i)                   &&
ii)                %
iii)              >=
iv)              ++




b) Identify the statements listed below as assignment, increment, method invocation or object creation statements.
i)                   System.out.println(“Java”);
ii)                costPrice = 457.50;
iii)              Car hybrid = new Car();
iv)              petrolPrice++;
c) Give two differences between switch statement and if-else statement.
d) What is an infinite loop? Write an infinite loop statement.
e) What is a constructor? When is it invoked?.
                            

Question 3.                                                                               [2x10=20]

a) List the variables from those given below that are composite data types.
i)                   static int x;

ii)                boolean b;

iii)              arr[i]=10;

iv)              private char chr;

v)                 obj.display();

vi)              String str;

 b) State the output of the following program segment.                                                                      
             String s1 = “great”; String s2=”minds”;
       System.out.println(str1.substring(0,2).concat(str2.substring(1)));      
      System.out.println((“WH” + (str1.substring(2).toUpperCase() )));                                                      

 c) What are the final values stored in variables x and y below?
                double a = -6.35;
                double b = 14.74;
                double x = Math.abs(Math.ceil(a));
                double y = Math.rint(Math.max(a,b));

                            
 d) Rewrite the following program segment using the if-else statements.                                          
          String grade =(mark>=90)? ”A” : (mark>=80) ? “B“ : “C“ ;

 e) Give output of the following method?
                public static void main(String args[]) {                                            
                int a = 5;      
                a++;
                System.out.println(a);
                a- =(a-- ) – (-- a );
          System.out.println(a); }
               
 f)  What is the data type returned by the library functions?                             
             i)  compareTo()
             ii) equals()

 g) State the value of characteristic and mantissa when the following code is executed.
String s = “4.3756” ;
                int n = s.indexOf(‘.’);
                int characteristic = Integer.parseInt(s.substring(0,n));
int mantissa = Integer.valueOf(s.substring(n+1));

 h) Study the method and answer the given questions?    
public void sampleMethod() {                                            
                for(int i=0; i<3; i++)   
                {
                   for(int j=0; i<2; j++)   
                   {
                      int number = (int)(Math.random()*10 );  
              System.out.println(number);
   } } }
i)                   How many times does the loop execute?
ii)                What is the range of possible values stored in the variable number?

 i) Consider the following class:   
public class myClass {        
public static int x=3, y=4;
public int a=2, b=3; }
                                                 
i)                   Name the variables for which each object of the class will have its own distinct copy.
ii)                Name the variables that are common to all objects of the class.


j)  What will be the output when the following code segments are executed?                             
              i)    String s = “1001”;
                     int x = Integer.valueOf(s);
                      double y = Double.valueOf(s);
                      System.out.println(“x=” +x);      
                      System.out.println(“y=” +y);      

               
             ii)    System.out.println(“The King said \”Begin at the begining!\” to me.”);              
               
                         
SECTION B (60 Marks )
Attempt any four questions from this Section.
The answers in this section should consist of the program in Blue J environment with Java as the base. Each program should be written using Variable descriptions / Mnemonics Codes such that the logic of the program is clearly depicted.
Flow-charts and Algorithms are not required.


Q4. Define a class named movieMagic with the following description:     [15]
          Instance variables/data members:
          int year       - to store the year of release of the movie
          String title     - to store the title of the movie.
          float rating            - to store the popularity rating of the movie.
 (minimum=0.0 and maximum=5.0)
         
          Member Methods:
          movieMagic()         - default constructor to initialize integer data members
                                         to zero and string data members to “”.
          void accept()                  - to input and store year, title and rating.         
void display()        - to display the title of a movie and a message based
on the rating as per the table below:        
              
Rating
Message to be displayed
0.0 to 2.0
Flop
2.1 to 3.4
Semi-Hit
3.5 to 4.5
Hit
4.6 to 5.0
Super-Hit

Write a main method to create an object of the class and call the above member methods.
Q5. A special two digit number is such that when the sum of its digits is added to the product of its digits, the result is equal to the original two-digit number.   [15] 
 Example: Consider number 59
Sum of digits = 5 + 9 = 14
Product of its digits = 5 x 9 = 45
Sum of the sum of digits and product of digits = 14 + 45 = 59

Write a program to accept a two-digit number. Add the sum of its digits to the product of its digits. If the value is equal to the number input, output the message “Special 2-digit number” otherwise; output the message “Not a Special 2-digit number”.

Q6. Write a program to assign a full path and file name as given below. Using library functions, extract and output the file path, file name and file extension separately as shown below:                                                                 [15]          
Input:                             C:Users\admin\Pictures\flower.jpg                          
Output Path:         C:Users\admin\Pictures\    
File Name:            flower
Extension:             jpg

Q7. Design a class to overload a function area() as follows:           [15]                      
(i) double area(double a, double b, double c) with three double arguments and
     returns  the area of a scalene triangle using the formula:
     area =  s(s – a)(s - b)(s - c) where s = (a+b+c) / 2
         
(ii) double area(int a, int  b, int height) with three integer arguments
      and returns  the area of a trapezium using the formula:
      area = 1/2  * height(a+b)

(iii) double area(double diagonal1,double diagonal2) with two double arguments
      and returns  the area of a rhombus using the formula:
      area = 1/2 (diagonal1 * diagonal2)

           
Q8. Using the switch statement, write a menu driven program:     [15]                      
     To calculate the maturity amount of a bank deposit.
     The user is given following options:
     (i)  Term Deposit
     (ii) Recurring Deposit
For option (i) accept principal (P), rate of interest(r) and time period in years(n). Calculate and output the maturity amount (A) receivable using the formula:
A = P[1 + r / 100 ]n.
For option (ii) accept monthly installment (P), rate of interest(r) and time period in months(n). Calculate and output the maturity amount (A) receivable using the formula:
A=P * n + P * n(n+1)/2 * r/100 * 1/12

For an incorrect option, an appropriate error message should be displayed.

Q9. Write a program to accept the year of graduation from school as an integer value from the user. 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. If not, output the message “Record does not exist”.   [15]                     
{1982, 1987, 1993, 1996, 1999, 2003, 2006, 2007, 2009, 2010}