0% found this document useful (0 votes)
458 views5 pages

Class 9 Computer Applications (Finals 20-21)

This document provides the structure and questions for a Computer Applications exam for Class 9. It is divided into two sections - Section A with 5 multiple choice questions worth 2 marks each, and Section B with 4 long-form questions worth 15 marks each. Section B asks students to write programs to calculate ticket discounts, check for special numbers, build a menu-driven bank deposit calculator, generate math series, and calculate employee pay and allowances.

Uploaded by

Aditya Pandey
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)
458 views5 pages

Class 9 Computer Applications (Finals 20-21)

This document provides the structure and questions for a Computer Applications exam for Class 9. It is divided into two sections - Section A with 5 multiple choice questions worth 2 marks each, and Section B with 4 long-form questions worth 15 marks each. Section B asks students to write programs to calculate ticket discounts, check for special numbers, build a menu-driven bank deposit calculator, generate math series, and calculate employee pay and allowances.

Uploaded by

Aditya Pandey
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/ 5

COMPUTER APPLICATIONS

CLASS - IX
(Theory)
(Two Hours)
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.
This Paper is divided into two Sections. 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
Question 1.
(a) Define abstraction. [2]
(b) Explain the purpose of using a ‘new’ keyword in a Java program. [2]
(c) What are literals? [2]
(d) Mention two types of Java Program. [2]
(e) What is fall through? [2]
Question 2.
(a) Differentiate between == and = operators. [2]
(b) Rewrite the following condition using ternary operators:
int a;
if ( x<y && y>z )
a=10;
else
a=25; [2]
(c) Rewrite the following for loop using while loop:
for(int x= 5; x<=50; x+=5)
{
System.out.print("*");
} [2]
(d) Name the functions of the Scanner class that is used to:
(i) Accept a number of long data type.
(ii) Accept a group of alphabets. [2]
(e) Which of the following are invalid identifiers and why?
(i) My Program (ii) 4$ABC (iii) RETURN (iv) Name [2]

Question 3.
(a) Predict output of the following:
(i) System.out.println(Math.pow(25,0.5)+Math.ceil(4.2) );
(ii) System.out.println(Math.round ( 14.7 ) + Math.floor ( 7.9)); [2]
(b) Write the following statement using nested if statement
if( a>b && a>c)
{
System.out.println(a);
} [2]

(c) What is the output of the following:


String str="Java is an OOP language \n developed by \t\'James Gosling\'";
System. out. println(str); [2]
(d) Differentiate between break and continue. [2]
(e) Write a statement in Java for
√( + )3| − | [2]
(f) What is the value of b after evaluating the following expression:
b+ = -- c + ++c + a++ * (++b);
when
int a=12,b=13 and c= 11 ; [2]
(g) What will be the output of the following program segment?
int i = 1;
while(i++<=1)
{
i++;
System.out.print(i + “ ” );
} [2]
System.out.print(i);

(h) State the difference between if-else if ladder and switch...case. [2]
(i) What is the result produced by 2 – 10*3 + 100/11? Show the steps. [2]
(j) What will be the output of the following program segment?
int a= 5, b = 2,c;
if (a>b || a ! = b)
c = ++a+--b;
System.out.print(c+ “ ”+a+ “ ”+b); [2]

SECTION B (60 Marks)


Attempt any four questions from this Section.
Each program should be written using Variable descriptions/Mnemonic Codes so
that the logic of the program is clearly depicted.
(Flow-Charts and Algorithms are not required.)
Question 4.
Happy Trip Travels Pvt. Ltd. gives the following discount to its customers:

Ticket amount Discount

Above Rs. 70000 18%

Rs. 55001 to Rs. 70000 16%

Rs. 35001 to Rs. 55000 12%


Rs. 25001 to Rs. 35000 10%

less than Rs. 25001 2%

Write a program to input the name and ticket amount for the customer and
calculate the discount amount and net amount to he paid. Display the output in
the following format for each customer:

[15]

Question 5.
Write a program to input an integer and check whether it is Special or not?
Special number is a number whose digits factorial when totaled is equal to the
number itself. Eg 145
Sum of the factorial of digits = 1! + 4! + 5! = 1 + 24 + 120 = 145
which is equal to the number.(Factorial of the number is the product of all the
numbers from 1 till the number itself)
Input: Enter an integer
145
Output: 145 is an Special number [15]
Question 6.
Using the switch statement, write a menu driven program to calculate the
maturity amount of a Bank Deposit.
The user is given the following options :
(i) Term Deposit
(ii) Recurring Deposit
For option (i) accept principal (P), rate of interest(r) and time period m years(n).
Calculate and output the maturity amount (A) receivable using the formula

For option (ii) accept Monthly Installment (P), rate of interest (r) and time period
in months (n). Calculate and output the maturity amount (A) receivable using the
formula

For an incorrect option, an appropriate error message should be displayed. [15]

Question 7.
Write programs for the following series: [15]
(a) 1, 8, 27,64, 125 . . . n terms
(b) s= 1/2 + 2/3 + 3/4 …… 9/10
Question 8.
Write a class with name employee and basic as its data member, to find the gross
pay of an employee for the following allowances and deduction. Use meaningful
variable.
Dearness Allowance = 25% of Basic Pay.
House Rent Allowance = 15% of Basic Pay.
Provident Fund = 8.33% of Basic Pay.
Net Pay = Basic Pay + Dearness Allowance + House Rent Allowance.
Gross Pay = Net Pay – Provident Fund. [15]
Question 9.
Write a program to generate a triangle or an inverted triangle till n terms based
upon the user’s choice(using if else) of triangle to be displayed.
Example 1:
Input : Type 1 for a triangle and
Type 2,for an inverted triangle
1
Enter the number of terms
5
Output :
1
21
321
4 321
5 4321

Example 2:
Input : Type 1 for a triangle and
Type 2 for an inverted triangle
2
Enter the number of terms
6
Output :
666666
55555
4444
333
22
1 [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