In this ICSE sample paper all the topics of java for ICSE computer application has been covered.
ICSE sample paper
This paper is divided into two sections. You are to answer all the questions from Part I, and any four from Part II.
SECTION A (40 Marks)
Attempt all questions from this Section
- What is the difference between abstraction and polymorphism? 
- What is the difference between unary and binary operator? 
- Explain function overloading with an example. 
- What will be the output of the following code? 
- What is keyword? Give two example. 
Question 2. [5*2=10]
- Define the term bytecode.
- What do you mean by type conversion? How is implicit conversion different from
- What do you understand by JVM?
- What do you understand by primitive and non-primitive data type?
- Convert the following segment into equivalent for loop public void display()
while ( i !=0)
System.out.print(i +” “);
Question 3. [5*2=10]
- Give two differences between switch statement and if-else statement.
- What is an infinite loop? Write an infinite loop statement.
- If the value of a = 3, what does the expression below evaluate to,
a + = a + + + + + a + a;
- Rewrite the following program segment using the if-else statements.
String grade = (mark>=90) ? “A” : (mark>=80) ? “B” : “C”;
- 5. State one difference between floating point literals float and double.
Question 4. [5*2=10]
- Write a java expression for the following.
- What are the final values stored in x and y below?
double a= -2.15;
double b= 29.87;
- Give one example each of a primitive data type and a composite data type.
- What is the use of default in a switch?
- Explain the term object with example?
SECTION B (60 Marks)
Attempt any four questions from this Section.
The answer in the Section should consist of the Program in BlueJ environment with Java. Each program should be written using Variable descriptions/Mnemonic Codes such that the logic of the program is clearly depicted. Flow-Charts and Algorithms are not required.
Question 5 
Write a program to generate the following pattern.
1 2 3
1 2 3 4
1 2 3 4 5
Question 6 
Write a class in java to enter any number and print if it is a perfect number.[Hint: a number is said to be perfect if it is equal to sum of all its factors ex, 6=1+2+3, hence 6 is perfect number]
- Using switch case create class which take month number 1-12 and prints the corresponding month in words [3- March, 12-December] 
- b. Write a class to input a number and print if it is a prime number or not. 
Question 9. 
Create overloaded methods named void calc_Area ( ), that has been overloaded to perform the following functions
- Area of circle
- Area of Rectangle
ICSE sample paper
Write a menu driven program in Java to display the above 2 menus and execute the overloaded methods and display the Area in the respective functions,
calc_Area (double) for Circle,
calc_Area (double, double) for Rectangle
[Area of circle=πr2, Area of rectangle=width * height]
Question 10. 
Define a class named movieMagic with the following description: Instance variables/Data members
int year – to store the year of release of a movie
String title – to store the title of the movie float rating – to store the popularity of a movie
(minimum rating = 0.0 and maximum rating = 5.0)
- i) void accept() To input and store year, title and rating.
- ii) void display() To display the title of a movie, the year of release 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.5 to 5.0 Super hit
Write a main method to create an object of the class and call the above member methods.
ICSE sample paper