Back to Tutorials
Sample PapersICSEClass 9Computer Applications

ICSE sample paper class 9

Section A (40 marks) compulsory questions

Trushna Tejwani8 April 2021
Sample Papers

ICSE sample paper class 9

https://wordpress-343193-1101484.cloudwaysapps.com/loops-for-while-do-while

Section A (40 marks) compulsory questions

Q A. Define following. [5X2=10]

  1. Abstraction
  2. Differentiate object and class
  3. Write any 4 characteristics of OOP.
  4. What is IDE?
  5. What are the default values of int and float?

Q B. Write difference between the following. [5X2=10]

  1. Source code and object code
  2. // and /*...*/
  3. Keyword and Identifier
  4. If and switch
  5. for and do...while loop

ICSE sample paper class 9

Q C. [10X2=20]

  1.  Write output of the following.      

System.out.println ("Bentley”);

System.out.print("BMW ”);

System.out.println("Tesla");

System.out.print("Mercedes");

  1. Name all the types of errors.
  2. Write output of the following.      

for(int i=1;i<=5;i++)

System.out. print(i+” “);

  1. Convert the following loop into while loop

for(int j=10;j>=1;j--)

System.out. print(j+” “);

(i)Name the package used for scanner class.

(ii)The scanner class function to take a double as input

  1. &nbsp;Explain the term explicit conversion with an example.
  2. What will be the values in A1 and A2?&nbsp;

double A1= Math.abs(Math.min(-2.54, -4.67));

double A2=Math.sqrt(Math.floor(100.2));

  1. Write the following expression in java.&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  2. if x=3, What is the value of x after evaluating the expression

x+= x++ ---x+ 3+ --x

  1. What will be the value in a,b and c if the following expression is executed.&nbsp;

if a=2, b=4

c=a++ - b--+ --a

ICSE sample paper class 9

Section B (60 marks)

Write JAVA Programs. (Write INPUT and OUTPUT of each program) (Attempt any six) [6X10=60]

  1. Write a program to check whether the given year is a leap year or not.&nbsp;
  2. Write a program to take the month number from the user and display the name of the month. Display an error message for wrong input(Use switch case only).&nbsp;
  3. Write a program to accept a number from the user and display if the given number is prime or not. A prime number is a number that has only two factors.
  4. Write a program to, compute the railway fare depending on the criteria as given

<tbody>

Distance (in kms)

Fare (Rupees per Km)

Below 10

Rs. 5

From 10 to 30

Rs. 20

From 31 and 50

Rs. 30

Above 50

Rs. 50

</tbody>

  1. The sum of two distances is calculated as:

Distance 1 = 10 feets 24 inches

Distance 2 = 5 feets 16 inches

Sum of Distances= 18 feets 4 inches

Write a program in Java to input two distances and calculate their sum by applying proper adjustments.

Display the final result with an appropriate message. (Given 1 feet = 12 inches)

  1. A computer salesman gets commission on the following basis:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<tbody>

Sales

Commission Rate

Rs. 0 - 20,000

3%

Rs. 20,000 - 50,000

12%

Rs. 50,001 and more

31%

</tbody>

Write a program to accept the sales as input, calculate and print his commission amount and rate of commission.

  1. Write a program to find the sum of the following series.&nbsp;

sum=1+4+9+16+..........100

sum= 2+4+6+8+……..n

  1. Write a program to print the following series.&nbsp;
  • 1 &nbsp; 3 &nbsp; 5 &nbsp; 7 &nbsp; 9
  • 30 &nbsp; &nbsp; 25 &nbsp; &nbsp; 20&nbsp; &nbsp; 15&nbsp; &nbsp; 10
  1. Write a menu driven program using switch case statement that outputs the results of the following evaluation based on the number entered by the user
  • Maximum of the&nbsp; two numbers
  • Absolute value of the number
  • Square root of the number
  • Random numbers
  • ICSE sample paper class 9
  1. Write a program to input the basic salary of a person and&nbsp; calculate the salaries and other allowances as given below and print all the values.&nbsp;

special allowance =15%of basic salary

conveyance allowance= 10% of basic salary

pf=5% of basic salary

gross=basic salary+special allowance+conveyance allowance

net salary=gross-pf

  1. Write a program to print the following paragraph

Online teaching is the process of educating others via the internet.

Various methods can be used such as

  • one-on-one video calls
  • group video calls
  • webinars.&nbsp;
  • ICSE sample paper class 9

http://www.youtube.com/trushnatej