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

class9

The document is an examination paper for Class IX Computer Applications at Loyola Public School, consisting of multiple-choice questions, short answer questions, and programming tasks. It covers various topics in Java, including data types, operators, error types, and object-oriented programming principles. The exam is divided into two sections, with Section A focusing on multiple-choice questions and Section B requiring detailed answers to programming-related questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

class9

The document is an examination paper for Class IX Computer Applications at Loyola Public School, consisting of multiple-choice questions, short answer questions, and programming tasks. It covers various topics in Java, including data types, operators, error types, and object-oriented programming principles. The exam is divided into two sections, with Section A focusing on multiple-choice questions and Section B requiring detailed answers to programming-related questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

LOYOLA PUBLIC SCHOOL

HALF-YEARLY EXAMINATION
COMPUTER APPLICATIONS CLASS : IX MARKS : 100

SECTION : A [MARKS 100]

I. Choose the correct answer. [20X1=20M]


1. What is the significance of the static keyword in Java? [ ]
A) It can be accessed without creating an object
B) It cannot be used without creating an object
C)It can be used after creating an object
D) All of the above
2. What is the default value of boolean variable in Java? [ ]
A) true B) false C) null D) None of these
3. Name the process that uses direct assignment of a constant to a
defined variable. [ ]
A) Static Initialisation B) Dynamic Initialisation
C) Declaration D) Instantiation
4. Which of the following is a valid literal for a char variable in Java?[ ]
A) D B)"D" C) 'D' D)100
5.State the values of x. [ ]
int a= 65;
float x= a++;
A) 65 B)65.0 C)66 D)66.0
6. double x; int a=2,b=3,c=5; x=a*b+c/2 [ ]
What will be the value stored in x?
A)8.0 B) 8.5 C)5.5 D)5.0
6. What will be the value tax when the given statement is executed when
the income of a person is Rs. 500000/-
double tax=(income<=100000)?0:(0.01*income); [ ]
A) 50000 B) 50000.0 C) 5000 D)5000.0
7. What is the result of the expression (a>10)&&(b<50) when a=100 and
b=200? [ ]
A) true B)false C)"true" D)"false"
8. What is the result of the expression 25/2.0 in java? [ ]
A) 1 B) 12 C)12.0 D)12.5
9. What is the result of the expression 120%4 in Java? [ ]
A)30 B)0 C)30.0 D)0.0
10. What is the purpose of Scanner class in Java? [ ]
A) To read input from the keyboard B)To write output to the screen
B) To read data from a file D)All of these
11. What happens when the Java compiler encounters a comment?[ ]
A) It executes the comment statement
B) B)It throws a syntax error
C)It ignores the comment and continues the compiling
D)It terminates the program
13. Can a method have multiple arguments in Java? [ ]
A)yes B)No
C)Only when they are of same datatype D)None of these
14. Name the method type in case if it doesn’t return any value. [ ]
A)static B)void C)main D)return
15. Name the type of error in case division operator used when the
operation should be subtraction.
A)Syntax error B) Logical error C)Run time error D)Both A and B
16. What will be the result of x when following statement is evaluated if
a=123?
x=(a%2!=0)? "Odd":"Even"; [ ]
A) ”Odd” B)”Even” C)Odd D)Even
17. Name the primitive data type that is a 64 bit integer. [ ]
A) float B)double C)int D)long
18. What is the significance of the keyword static? [ ]
A) It is used for dynamic memory allocation of an object
B) It is not used for dynamic memory allocation of an object
C) It states that the method requires instantiation
D) It states that the method doesn’t require instantiation
19. What is the extension of the Java source code file? [ ]
A) .Java B) .Class C) .Source D) .exe
20. Name the keyword to include a package in a java program. [ ]
A) include B)import C)package D)include package

II. Answer the following questions. [10X2=20M]


1. Define encapsulation with an example.
2. Name the OOP principle: i)to hide the complexity of the system.
ii) to implement the code re-usability.
3. Write a short note on Java byte code.
4. Distinguish between an object and a class.
5. What are the rules for naming a variable?
2 2
a +b
6. Write an expression in Java for
4 ab

7. Give the output of the following expression: x+= x++ + ++x + x-- + --x
when x=5;
8. Name the method of Scanner class that :
i) is used to input a float data from the standard input device.
ii) is used to input a long data from the standard input device.
9. What is a package? Give an example.
10. Explain the comment statements and their usage in the Java
program.

SECTION :B [60 MARKS]

III. Answer any four questions from the following. [4x15=60M]


Question:1
a). List any five features of Java. [5M]
b). Write a short note on i)Inheritance and ii) Polymorphism [5M]
c). What do you mean by type conversion? How is implicit conversion
different from explicit conversion? [5M]
Question:2
a) . Differentiate between:
i) = and == ii) / and % iii) print() and println()
iv) Prefix operator and Postfix operator
v)Unary operator and Binary operator [5x2=10M]
b) Explain the three types of errors that occur in a computer program.
5M
Question:3
a) Write a program to input time in seconds. Display the time after
converting them into hours, minutes and seconds. [8M]
Sample Input: Time in seconds : 5420
Sample Output: 1 Hour 30 Minutes 20 Seconds
b) Write a program to input two unequal numbers. Display the numbers
after swapping their values in the variables without using a third variable.
Sample Input : a=67, b= 98 [7M]
Sample Output: a=98, b=67
Question:4
a) Write a program to find the smallest among the 3 numbers(unequal)
entered by the user using the Scanner method. [8M]
Sample Input: a=17, b=67, c=9
Sample Output: Smallest Number is 9
b)Write a program to input the length and breadth of a rectangular field
using a function argument method. Find its area and perimeter.[ 7M]
[Hint: area= length X breadth and perimeter=2(length+breadth)]
Question:5
Write a program to input the name and basic salary of an employee
using Scanner class. Calculate and display the gross salary and net
salary when: da= 25% of basic
hra=12.5% of basic
pf=10% of basic. [15 M]
[Hint: gross=basic+da+hra and net=gross-pf]
Question:6
Write a program to accept the marks of a student scored in 6 subjects
using Scanner class. Calculate the total and the average marks. Display
whether the student is promoted to the next class or not. [15 M]
[Hint: Student is promoted to the next class on securing the average
marks of 40% or above.]

You might also like