Tuesday, September 26, 2017

ICSE Computer Applications 2017 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 (2017 release) includes 2017 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.   flipkart : 
3.    Amazon India :
4.    dial a book :  


ICSE Paper – 2017
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 is Inheritance.                       
b) Name the operators listed below.
i) <       ii) ++ iii) &&         iv) ? :                

c) State the number of bytes occupied by char and int data types.                                  
d) State difference between / and % operator.
e) String x = [“SAMSUNG”, “NOKIA”, “SONY”, “MICROMAX”, “BLACKBERRY”]
Give the output of following statements:
i)                System.out.println(x[1]);
ii)              System.out.println(x[3].length());

Question 2.                                                                                             [2x5=10]
a)  Name the following:
i) A keyword used to call a package in the program.  
ii) Any one reference data type.
b) What are the two ways of invoking the functions?
c) State the data type and value of res after the following is executed.
char ch = ‘t’;
res = Character.toUpperCase(ch);
d) Give the output of following program segment and also mention the number of times loop will be executed:
int a, b;
for (a=6,b=4; a<=24; a=a+6)
{
          if(a%b == 0)
          break;
}
System.out.println(a);                            
e) Write the output:
char ch = ‘F’;
int m = ch;
m = m + 5;
System.out.println(m + “ ” + ch);

Question 3.                                                                                  [2x10=20]

a) Write a Java expression for the following.
ax5 + bx3 + c

b) What is the value of x1 if x=5 ?
x1 = ++x – x++ + --x

 c) Why is an object called an instance of a class?                             
 d) Convert the following do-while loop into for loop.         
          int i = 1;
int d=5;
          do {
                    d = d*2;
                    System.out.println(d);
i++;
}while(i<=5);

 e)  Differentiate between constructor and function.
 f) Write the output for the following:    
String s=”Today is test”;
System.out.println(s.indexOf(‘T’));
System.out.println(s.substring(0,7)+ “” +”Holiday”);

g)  What are the values stored in variables r1 and r2:
i)                double r1 = Math.abs(Math.min(-2.83, -5.83)) ;
ii)              double r2 = Math.sqrt(Math.floor(16.3));

h)  Give the output of following code:
String A = “26”, B = “100”;
String D = A + B + “200”;
int x = Integer.parseInt(A);
int y = Integer.parseInt(B);             
int d = x+y;
System.out.println(“Result 1= ” + D);
System.out.println(“Result 2= ” + d);
              

i)  Analyze the given program segment and answer the following questions:
for (int i=3; i<=4; i++)      {
for (int j=2; i<=i; j++)       {
System.out.print(“”);         }
System.out.println(“WIN”);             }

i)                 How many times the inner loop execute?
ii)               Write the output of the program segment.

j)  What is the difference between scanner class functions next() and nextLine():

                         
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 ElectricBill with the following description:     [15]
          Class             : ElectricBill
Instance variables/data members:
           string n        - stores the name of customer
          int units        - stores the number of units consumed
          double bill      - store the amount to be paid.
                   
          Member Methods:
          void accept              - accept name of customer and number of units consumed.       
void calculate()      - to calculate the bill as per the following tariff.

Number of units
Rate per unit
First 100 units
Rs 2.0
Next 200 units
Rs 3.0
Above 300 units
Rs 5.0

A surcharge of 2.5% charged if the number of units consumed is above 300 units
void print()  -To print the details as follows.

Name of the customer..
Number of units consumed..
Bill amount..

Q5. Write a program to accept a number and check and display whether it is a spy number or not.                                                                                   [15] 
A number is spy if the sum of its digits equals the product of its digits.
Example: 1124 Sum of the digits = 1 + 1 + 2 + 4 = 8
Product of the digits = 1 x 1 x 2 x 4 = 8


Q6. Using switch statement write a menu driven program for following:   [15]                      
(i) To find and display the sum of the series given below:
s = x1 – x2 + x3 – x4 + x5 ……. – x20 (where x = 2)
         
(ii) To display the following series:
1        11      111    1111  11111
For an incorrect option, an appropriate message should be displayed.
            
Q7. Write a program to input integer elements into an array of size 20            [15]          and perform the following operations.
i)                Display largest number from the array
ii)              Display smallest number from the array
iii)            Display sum of all the elements of the array
     
Q8. Design a class to overload a function check() as follows.
i)                void check(string str, char ch)  - to find and print the frequency of the character in the string. Example:
Input                                     Output
str = “success”                      number of ‘s’ present is = 3
ch = ‘s’

ii)              void check (string s1) – to display only vowels from string s1, after converting it to lower case. Example:
Input                                    
str = “computer”                   Output: o u e


Q9. Write a program to input forty words in an array. Arrange these words in descending order of alphabets using selection sort. Print the sorted array.

ICSE Computer Applications 2016 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 (2016 release) includes 2016 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.   flipkart : 
3.    Amazon India :
4.    dial a book :  
   

ICSE Paper – 2016
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) Define Encapsulation.                       
b) What are keywords? Give an example.                                                                                                    
c) Name any two library packages.               
d) Name the type of error (syntax, logical or runtime error) in each case given below:                                        
      i) Math.sqrt(36-45)               ii)  int a;b;c;           
e) If int x[]={4,3,7,8,9,10}; what are the values of p and q ?
               i) p = x.length                  ii)  q = x[2]+x[5]*x[1]


Question 2.                                                                                             [2x5=10]
a)  State the difference between == operator and equals() method.
b) What are the types of casting shown by the following examples:  
i) char c = (char) 120        ii)  int x = ‘t’;
c) Differentiate between formal and actual parameter.
d) Write a function prototype of following.
A function PosChar which takes a string argument and a character argument and returns an integer value.
e) Name any two types of access specifiers.
                            

Question 3.                                                                                  [2x10=20]

a) Give the output of following string functions.
i) “MISSISSIPPI”.indexOf(‘S’) +“MISSISSIPPI”.lastIndexOf(‘I’)
ii)  “CABLE”.compareTo(“CADET”);

b) Give the output of following Math functions
i) Math.ceil(4.2)     ii)  Math.abs(-4)

 c) What is a parameterized constructor?                             
 d) Write down Java expression for T = A2+B2+C2              
 e)  Rewrite the following using ternary operator:
               if(x%2==0)
          System.out.print(“EVEN”);
          else
          System.out.print(“ODD”);


  f)  Convert the following while loop to the corresponding for loop:
          int m = 5, n = 10;
          while (n>=1)
{
                    System.out.println(m*n);
n--;
}

 g)  Write one difference between primitive and composite data types.
 h) Analyze the given program segment and answer the following questions:    
i)                Write output of the program      
ii)              How many times does the body of the loop gets executed.

               for(int m = 5;m<=20;m+=5)
               { if (m%3 == 0)
                              break;
                  else
                  if (m%5 == 0)      
                     System.out.println(m);  
              continue;
  }


 i) Give the output of following expression:   
a += a++ + ++a + --a + a--; when a=7    

j)  Write the return type of following library functions:
i)                isLetterOrDigit(char)      
ii)              replace(char, char)

              
              


                         
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 BookFair with the following description:     [15]
          Instance variables/data members:
          String Bname          - stores the book name
          double price            - stores price of the book.
                   
          Member Methods:
          BookFair()               - default constructor to initialize data
 members.       
void input()             - to input and store the name and price of the book.
void calculate()      - to calculate price of the book after discount. Discount is calculated based on following criteria.

Price
Discount
Less than or equal to Rs1000
2% of price
More than Rs1000 and less than or equal to Rs3000
10% of price
More than Rs3000
15% of price

 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 member methods.

Q5. Using switch statement write a menu driven program for the following.  [15] 
a)    Print Floyd’s triangle

b) Display following pattern
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
I
I C
I C S
I C S E

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

Q6. Special words are those words which starts and ends with the same letter [15]   Example: EXISTENCE, COMIC, WINDOW       
Palindrome words are those words which read the same from left to right and vice versa.
Example: MALAYALAM, MADAM, LEVEL, ROTATOR, CIVIC      
All palindromes are special words but all special words are not palindromes.
Write a program to accept a word check and print whether the word is a palindrome or only a special word.

Q7. Design a class to overload a function SumSeries() as follows:           [15]                      
(i) void SumSeries (int n, double x) with one integer argument and one double argument to find and display the sum of the series given below:
s = x/1 – x/2 + x/3 – x/4 + x/5 ……. To n terms.
         
(ii) void SumSeries() To find and display the sum of the series given beow:
S = 1 + (1X2) + (1X2X3) + ……… + (1X2X3X4……X20)
            
Q8. Write a program to accept a number and check and display whether it is a Niven number or not.                                                                             [15]          (Niven number is that number which is divisible by its sum of digits)
Example:
Consider number 126. Sum of digits is 1+2+6=9 and 126 is divisible by 9            
     
Q9. Write a program to initialize the Seven Wonders of the World along with their locations in two different arrays. Search for a name of the country input by the user. If found, display the name of the country along with its wonder, otherwise display “Sorry Not Found!”
Seven Wonders – CHICHEN ITZA, CHRIST THE REDEEMER, TAJMAHAL, GREAT WALL OF CHINA, MACHU PICCHU, PETRA, COLOSSEUM
Locations – MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY
Example: Country Name: INDIA         Output: INDIA - TAJMAHAL
      Country Name: USA            Output: Sorry Not Found!

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.