Test - 3
Test - 3
Test – III
F.M.: 60. Allotted Time: 1hr 30mins.
Group: B (Answer All Questions) (10X1=10)
1. i) Which among the following is not a language feature in Java?
a. Robust b. Secured c. Platform Independent d. Procedure Oriented
ii). Which among the following modifier is used in a ‘class’?
a. public b. default c. Both a and b d. None of these
iii). Name the characteristics of Object Oriented Programming that hides the complexity and
provides a simple interface.
a. Encapsulation b. Polymorphism c. Abstraction d. Inheritance
iv. What is a set of pseudo machine language instructions that are understood by the Java
Virtual Machine and are independent of the underlying hardware called?
a. JVM b. Source Code. c. Compilation d. Bytecode
v. An object belonging to a particular class is known as a/an ........... of that class.
a. Interface b. Instance c. Alias d. Member
vi. Which among the following is not a language feature in Java?
a. Robust b. Secured c. Platform Independent d. Procedure Oriented
vii. Which among the following Scanner methods allows us to input a number with a decimal
point?
a. nextInt() b. nextFloat() c. nextDecimal() d. nextPoint()
viii. The statement a%2 will result to what if the value of a is an even number?
a. 0 b. 1 c. Both a and b d. None of these
ix. Which among the following is a valid float literal?
a. 12.36f b. 12.36F c. 12.36 d. Both a and b
x. The member ‘out’ object of the ‘System’ class belongs to which class?
a. System b. Print c. PrintStream d. Println
Group: B (Answer All Questions) (10X2=20)
2. i). What is an expression?
ii). State the difference between Applet and Application.
iii). What is an expression?
iv). What is JVM? Explain its relationship with byte code.
v). What are the different punctuators available in Java?
vi). How can you create an instance of a class?
vii). What is an access modifier? Name the access modifiers in Java.
Viii). What are keywords?
ix). Define Data abstraction with an example.
x). Define Encapsulation with an example.
Group: C (Answer any three) (10X3=30)
3. i). If the total selling price of 15 items and the total profit earned on them is input through the
keyboard, write a program to find the cost price of one item.
ii). Write a program to input an integer and if positive change it to negative and if negative
change it to positive.
iii). Using a switch statement, write a menu driven program to find the area and perimeter of
a square or rectangle. For finding the area and perimeter of a square input the side length and
for finding the area and perimeter of the rectangle input the length and breadth.
iv). Write a program to input the Basic Pay of an employee and find the gross pay of the
employee for the following allowances and deductions.
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
---------------------------------------------------------------------------------------------------------------------------