75% found this document useful (4 votes)
3K views

Class-9, Computer Applications

This document contains instructions and questions for an examination for Class 9 students. It has two sections - Section A with 40 marks and Section B with 60 marks. Section A contains multiple choice and short answer questions testing concepts like data types, operators, functions etc. in Java. Section B contains longer programming questions involving writing Java code to solve problems related to discounts, interest calculation, random number generation etc. Students are instructed to write their answers on a separate paper within the allotted 2 hours time.

Uploaded by

Ayush Ranjan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
75% found this document useful (4 votes)
3K views

Class-9, Computer Applications

This document contains instructions and questions for an examination for Class 9 students. It has two sections - Section A with 40 marks and Section B with 60 marks. Section A contains multiple choice and short answer questions testing concepts like data types, operators, functions etc. in Java. Section B contains longer programming questions involving writing Java code to solve problems related to discounts, interest calculation, random number generation etc. Students are instructed to write their answers on a separate paper within the allotted 2 hours time.

Uploaded by

Ayush Ranjan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

INTER NOBILIAN FIRST SEMESTER EXAMINATION, 2021 – 22

CLASS – 9
Time: 2 hours. Computer Application Full Marks 100
Answer 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.

Section – A (40 Marks)

1. Fill in the blanks. [6]


a) The size of double data type is -------------------- bytes and that of short is -------------- bytes.
b) -------------------- operator uses only one operand.
c) The keyword used to declare a constant is -----------------
d) SQL is an example of ----------------------
e) Java interpreter is called ----------------------------

2. Which property of java is indicated by these real world situations: [4]


a) You work with your remote to change channels of your TV, without knowing how the
remote actually works.
b) A person can act differently in different cases like he may be a father at home, a teacher at
school or a customer in a shop.
c) A Lion and A Tiger have some characteristics which they share.
d) The internal working of a machine is hidden by enclosing it within a case.

3. a) Give two differences between primitive and composite data type. [2X5=10]
b) Identify the type of literals in each of the given cases: 0x36, „3‟, “3”, 3.6
c) Pick out the valid identifiers: fun, name1, 1s, $ab, s.p, int.
d) What is the difference between a+1 and a++?
e) Classify the following Operators based on the number of operands: ++, +, !, !=, ?:, &&.

4. a) What will be the value of:- [2+2]


i) Math.pow(Math.sqrt(36),3)
ii) Math.ceil(Math.sqrt(79))

b) Find the value of y if a=3 initially [2]


y=a++ + ++a + a;

c) What type of value is returned by the following functions. [2]


i) pow( ) ii) max( )

d) Write a statement in Java, to declare a constant MAX and store the value 100 in it. [2]
5. a) Consider the following code segment [2X5=10]
int a=15, b=10;
if(x>70)
{
If(x<80)
a+=b;
}
else
a-=b;
System.out.println(a);
What will be the output of the value of x is – (i) 65 (ii) 90

b) Consider the following code


switch (n)
{
case 1:
system.out.println(“One”);
case 2:
system.out.println(“Two”);
break;
case3:
system.out.prinln(“Three”);
break
case 4:
system.out.println(“Four”);
default:
system.out.println(“Invalid”);
}
What will be the output if the value of n is: (i) 2 (ii) 4 (iii) 1 (iv) 0

c) Identify each of the tokens in the statement: int sum = 15 + ‘A’ ;

e) What will be the value of x = 5 * 2 % 3 + 7 / 2 % 2

e) Name the following –


i) The type of character set used by Java
ii) The package that contains the Math class
Section B (60 Marks)
(Attempt any four questions)

6. Write a program to assign the sequence number of a month and display the name of the month
and the number of days in the given month. [15]
Example:
ASSIGNED VALUE: 5
OUTPUT
MAY – 31 DAYS

7. A shopping mall is celebrating annual MEGA SALE during which they are offering discounts on
the total purchase amount based on the following criteria [15]
AMOUNT DISCOUNT
UPTO Rs.1000 5%
1001 to 2500 10%
2501 to 5000 12%
Greater than Rs.5000 15%
Write a program to assign the amount and display the discount and net price after availing the
discount.

8. Write a program to assign the three angles of a triangle and display if the triangle is possible or
not. Also, if the triangle is possible, display if it is an Acute angled triangle or Right angled
triangle or Obtuse angled triangle [15]

9. A bank is offering different rate of interest on fixed deposits based on the duration of investment
as follows: [15]
TIME Rate p.a.
Up to 1 year 5%
>1 year up to 3 years 5.5%
>3 years 5.25%
Write a program to assign the principal amount and time if duration (in years) and display the
final amount the bank will pay to the customer. A = P(1+R/100)T

10. a) How is Java compilation different from ordinary compilation? [5+5+5=15]


b) What is OOP? Define abstraction with the help of a suitable example..
c) What are the two types of Java programs? Write any three characteristics of Java.

11. a) Write a short note on each of second, third and fourth generation computer languages?
[6+6+3=15]
b) Write a program in Java to generate a random value between 1 and 6 (both included).

c) What is IDE? Give an example of IDE.



You might also like