80% found this document useful (5 votes)
3K views3 pages

Class 9 Computer Applications Exam Paper

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
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
80% found this document useful (5 votes)
3K views3 pages

Class 9 Computer Applications Exam Paper

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
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
  • Section A
  • Section B

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) [Link]([Link](36),3)
ii) [Link]([Link](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;
[Link](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:
[Link](“One”);
case 2:
[Link](“Two”);
break;
case3:
[Link](“Three”);
break
case 4:
[Link](“Four”);
default:
[Link](“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.



Common questions

Powered by AI

The formula A = P(1+R/100)^T calculates the final amount A after applying the interest rate R over the investment duration T on the principal amount P. It applies the concept of compound interest, where the principal grows by a rate R annually, compounded over T years .

The remote control example illustrates the principle of abstraction in object-oriented programming. Abstraction involves interacting with an object through its interface without needing to understand the internal workings. In this case, using a remote control to change TV channels without knowing how it works internally exemplifies abstraction .

Polymorphism is important because it allows objects to take on multiple forms depending on the context, as demonstrated by a person acting as a father, teacher, or customer in different scenarios. This facilitates flexibility and reusability in code, allowing a single interface to represent different underlying data types or classes .

Java is known for its platform independence, achieved through bytecode executed on the Java Virtual Machine. It offers robust security features, automatic memory management via garbage collection, and a rich standard library. Java’s object-oriented nature promotes clear, modular programs .

Java compilation involves converting code into bytecode using the Java compiler, which is then executed on any Java Virtual Machine, ensuring platform independence. Traditional compiled languages convert code directly into machine code specific to the instruction set of a CPU, limiting portability .

The logical error in the switch case code is the absence of break statements for cases 1 and 3. When "n" equals 1, the output would print "OneTwo" because the execution does not terminate at case 1 without a break, leading to the execution of subsequent statements until a break is encountered .

Math.pow() takes two arguments, a base and an exponent, returning the base raised to the power of the exponent, useful for calculations involving exponential growth or scientific computing. Math.ceil() rounds a decimal number up to the nearest integer and is used when precise ceiling calculations in decimal number operations are needed .

Primitive data types in Java, such as int and char, store simple values and have a fixed size. Composite data types, like arrays and classes, can store multiple values and are more complex, supporting data structures with varying types and sizes. They allow for structured data representation beyond simple values .

Abstraction focuses on hiding complex implementation details, allowing interaction with simpler interfaces, as in controlling a TV via remote without knowing internal operations. Encapsulation involves bundling data with methods that operate on them while restricting direct access, like private fields accessed via public methods in a Java class .

Operators in Java can be classified as unary, binary, or ternary based on the number of operands. Unary operators, such as ++ and !, require a single operand. Binary operators, like + and !=, require two operands. The ternary operator ? :, requires three operands .

INTER NOBILIAN FIRST SEMESTER EXAMINATION, 2021 – 22 
CLASS – 9 
Time: 2 hours. 
        Computer Application
5. 
a) 
Consider the following code segment 
[2X5=10] 
 
int a=15, b=10; 
 
if(x>70) 
 
{ 
 
   If(x<80) 
 
   a+=b; 
 
}
Section B (60 Marks) 
(Attempt any four questions) 
 
6. 
Write a program to assign the sequence number of a month and displa

You might also like