ICSE 2016 Computer Application Guess Paper

ICSE 2016 COMPUTER APPLICATION
(THEORY)
(Two Hours)

Answer to this ICSE 2016 Computer Application Paper must be written on the paper provided separately. You will not be allowed to write during the first 15 minutes. This time is to be spent in reading the question paper. The time given at the head is the time allowed for writing the answer.
—————————————————
This paper is divided into two Sections. 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 [].
—————————————————
SECTION A(40 Marks)
Attempt all questions.

Question 1.
a)    Define encapsulation.
b)    Explain the term object using an example.
c)    Define a variable.
d)    What is a wrapper class? Give an example.
e)    What is the purpose of the new operator?

Question 2.
a)    State the two kinds of data types.
b)    Write the corresponding expressions for the following mathematical operations:
(i) a2 + b2
(ii) z = x3 + y3 – xy/z
c)    Define an impure function.
d)    Differentiate between if and switch statements.
e)    What will be the output for the following program segment:
String s=new String(“abc”);
System.out.println(s.toUpperCase());

Question 3.
a)    What is meant by private visibility?          [2]
b)    Find and correct the errors in the following program segment:                              [2]
int n[]=(2,4,6,8,10);
for (int i=0;i<=5;i++)
System.out.println(“n[“+i+”]=”+n[i]);
c)    Explain function overloading with an example. [4]
d)    Find the output of the following program segment, when:
(i)  val = 500   (ii) val = 1600     [2]
int val,sum,n = 550;
sum = n + val > 1750 ? 400 : 200;
System.out.println(sum);
e)    What is a default constructor?                [2]
f)    What will be the output for the segment?      [2]
int a=0,b=30,c=40;
a = –b + c++ + b;
System.out.println(“a=”+a);
g)    Differentiate between compareTo() and equals() methods.                                      [2]
h)    What is a package? Give an example.           [2]
i)    Explain the function of a return statement.   [2]

SECTION-B (60 Marks)
Attempt any four questions from this Section. The answers in this Section should consist of the Program in BlueJ environment with Java. Each program should be written in using Variable descriptions/Mnemonic so that the logic of the program is clearly depicted. Flow charts and Algorithms are not required.

Question 4.
Design a program in Java to calculate the tax for the people living in India. Specify a class TaxPayer whose class description is given below:
Data member:
int pan     to store the personal account number
String name     to store the name of a person
double taxinc    to store the annual taxable income
double tax    to store the tax that is calculated
Member methods:
inputdata()    to enter the data for a taxpayer
display()        to display the data for a taxpayer
computetax()    to compute tax for a taxpayer
The tax is calculated according to the following rules:
Total Taxable income   Rate of taxation
Upto 60K              0%
>60K <=150K               5%
>150K but<=500K          10%
>500K                      15%
In the main program create an object of the taxpayer. Calculate the tax for the taxpayer and display all detail.

Question 5.
Write a program to enter a sentence then print all the words along with number of vowels present in it.
Ex: AMITABH SIR KI CLASSES
AMITABH = 3
SIR = 1
KI = 1
CLASSES = 2

Question 6.
N is a perfect number if the sum of all factors of the number (including 1 but excluding the number) is equal to N. For e.g. 6=1+2+3. The class numberProblem below contains some methods that help you to work with perfect number. Study the class and then answer the following questions.
public class numberProblem
{
boolean isPerfect(int N)
{
// return true if N is perfect, false otherwise.
}
void nosBelow(int limit)
{
// prints all perfect numbers less then limit.
}
}
Define the class numberProblem with the definitions of all the methods given in that class.

Question 7.
Design a class to overload a function volume() to calculate and print the volume as follows.
volume(double, int) -> of cylinder = PI r2h
volume(double, double) -> of cone = 1/3 PI r2h
volume(double) -> of sphere = 4/3 PI r3

Question 8.
AMITABH Sir, the Computer teacher has stored the marks of ‘Computer Applications’ of all 47 students of his class in a Single Dimensional Array. He wants to prepare a MERIT LIST on basis of their marks (using any technique). Also he wants to know the highest marks and the lowest marks in his class. Write a program to do the given task.

Question 9.
Write a menu driven program to find the sum of the following series depending on the user choice 1 or 2.
1.     S= 1/2 + 1/4 + 1/8 …… upto N terms.
2.     S= 1/2! – 2/5! + 3/10! …… upto N terms.

Leave a Comment