Class-9, Computer Applications
Class-9, Computer Applications
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.
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: ++, +, !, !=, ?:, &&.
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
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
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).