0% found this document useful (0 votes)
12 views

Grade 9 -Revision Sheet_ThirdTerm

This document is a term end revision paper for Grade IX students at JSS International School, Dubai, focusing on Computer Applications. It includes a theory section with multiple-choice questions covering Java programming concepts and a practical section requiring students to write Java programs on various topics. Students must attempt all questions from Section A and any four from Section B, with a total duration of 2 hours for the exam.

Uploaded by

Livi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Grade 9 -Revision Sheet_ThirdTerm

This document is a term end revision paper for Grade IX students at JSS International School, Dubai, focusing on Computer Applications. It includes a theory section with multiple-choice questions covering Java programming concepts and a practical section requiring students to write Java programs on various topics. Students must attempt all questions from Section A and any four from Section B, with a total duration of 2 hours for the exam.

Uploaded by

Livi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

‫ دبي‬, ‫مدرسة جيه اس اس العال ¸مِية‬

JSS INTERNATIONAL SCHOOL, DUBAI

Term End Revision Paper, 2024


GRADE: IX
Duration: 2 hrs

COMPUTER APPLICATION

(Theory)

Answers to this 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 of this paper is the time allowed for writing the answers.
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 from this Section

Question No. – 1

i. Identify the hierarchy of data types in increasing order:


a) byte, short, int, long
b) char, byte, short, int
c) short, char, int, long
d) int, char, long, short

ii. What happens when an integer is divided by zero in Java?


a) Syntax error
b) Logical error
c) Runtime error
d) No error

iii. What is the result of System.out.println(Math.pow(2, 3) + Math.sqrt(16));


a) 12
b) 12.0
c) 10.0
d) 10
iv. If a = 5, b = 8, solve:
b -= a++ + (--b) - (b++) + a;

a) 11
b) 10
c) -2
d) -3

v. What will be the output of this code?

char ch;
int a = 'E';
a += 3;
ch = (char) a;
System.out.println(ch);
a) G
b) H
c) h
d) Error

vi. Predict the output.


int i; for(i = 2; i <= 10; i += 2) ; System.out.print(i + " ");
a) 2 4 6 8 10
b) 12
c) 2 4 6 8 10 12
d) Error

vii. How many times will the loop be executed?


for (i = 1;i<10 ;);
System.out.println(i);
a) 0
b) 1
c) 10
d) infinite

viii. The correct statement to assign true to flag when x = 8 and y = 15 is:
a) flag = (x < 10 && y > 12) ? true : false;
b) boolean flag = (x > 10 || y > 12) ? false : true;
c) boolean flag = (x > 5 && y <= 15) ? true : false;
d) boolean flag = (x < 5 || y < 20) ? false : true;

ix. Which of the following is a valid Java identifier?


a) 9number
b) _myVar
c) class
d) @java
x. What does the "new" keyword do in Java?
a) Creates a new class
b) Creates a new object
c) Deletes an object
d) Defines a variable

xi. Which one is not binary Operator.


a) AND
b) %
c) ==
d) !

xii. Java bytecode can run on all systems. Name the feature.
a) Robust
b) Object Oriented
c) Platform Independent
d) Multithreaded

xiii. An example for empty loop is ___________


a) while(++a<=10);
b) for (int i=1;i<=10;i++);
c) do{ }while (a++<=10);
d) All of the above

xiv. To execute a loop 10 times, which of the following is correct?


a) for (int i=11;i<=30;i+=2)
b) for (int i=11;i<=30;i+=3)
c) for (int i=11;i<20;i++)
d) for (int i=11;i<=21;i++)

xv. The default value of a boolean variable is:


a) False
b) 0
c) false
d) True

xvi. The Assertion (A): Switch statements can only be used with integer data types in Java.
Reason (R):Switch statements are used to compare a single value against a list of possible values.
a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A)
c) Assertion (A) is true and Reason (R) is false.
d) Assertion (A) is false and Reason (R) is true.

xvii. int a=2780, b=10; System.out.print (a/b > a%b); System.out.println (a%1000);
a) false780
b) false2
c) true780
d) true
780
xviii. What will be the output after execution?

int m=7, n=1;


do { if(m%n==0)
System.out.print (m*n);
m-=2;
n++; }while(m>=1);
a) 7109
b) 79
c) Doesn’t print.
d) Error

xix. Identify the type of error(if any).


double a=10.2;
int b=12;
int c=a+b;

a) Syntax
b) Run Time
c) Logical
d) No Error

xx.

a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
Question No. – 2

1. What will be the output?


for(i=5;i<=1;i+=2){
for (j=1;j<=3;j++){
if(i==2&&j==2)
break;
System.out.print(“i=”+i+ “j=”+j);
}}

2. Rewrite using if:


int n=(a>b)?(a>c)?a:c: (b>c)?b:c;

3. int a=10, b=4; b*=--a + ++b + --a; [2]


4. Write Java statements:
a) To generate random numbers in the range 0 to 9.
b) To find the result of p raised to q.
5. What is meant by hacking?
6.
Write java expression for: [2]

7. Complete the following and also mention the result stored in the variables:-
a) ___________ n='D' + 3;
b) ____________p ='Q'+ ""+'R';

8. The following must display the precise value after division. Identify &debug the code.
int a=12; int b=5; System.out.println (b/a);

9. Use switch case:


if (grade == 'A') {
System.out.println("Excellent!");
} else if (grade == 'B') {
System.out.println("Good job!");
} else if (grade == 'C') {
System.out.println("Well done!");
} else {
System.out.println("Try harder!");
}

10.
int y;
for(y=15; y<=17;y++)
System.out.print(y);
System.out.println(y);
SECTION B ( 60 Marks)

Attempt any four questions from this Section

The answer in this section should consist of the Program in the BlueJ environment or any program environment
with Java as the base. Each program should be written using variable description/Menemonic Codes such
that the logic of the program is clearly depicted. Flow Charts and Algorithms are not required.

Question No. – 3

An employee wants to deposit a certain amount of money under ‘Term Deposit’ scheme in a bank. The bank has
provided the tariff of the scheme, which is given below:
No. of Days Rate of Interest No. Of Days Rate of Interest

Up to 180 days 5.5% Exact 365 days 9.0%

180 to 364 days 7.5% More than 365 days 8.5%

Write a program to calculate and display the maturity amount taking the sum and number of days as input. [15]

Question No. – 4

Write a program to print prime numbers between 100-200..


[15]
Question No. – 5

Write a program to accept a number and check whether it is Niven number or not. A number is said to be Niven
when it is divisible by the sum of its digits.
Sample Input: 126
Sum of digits=1+2+6=9 and 126 is divisible by 9 [15]

Question No. – 6

Write a program to print the sum of negative numbers, sum of positive even numbers and sum of positive odd
numbers from a list of numbers (N) entered by the user. The list terminates when the user enters a zero. [15]

Question No. – 7

Write a program in Java to display the following series:

[15]
Question No. – 8

Write a program to find the sum of the given two series. The sum should be calculated and printed separately.
i) x1+x2+x3+x4………xn
ii)

[15]

*******************

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy