Test - 2
Test - 2
Test – I
F.M.: 60. Allotted Time: 1hr 30mins.
Group: B (Answer All Questions) (10X1=10)
1. i) Which among the following is not a component of a class?
a. Modifiers b. Class name c. Object d. Body
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. Name the art of implementing Encapsulation in Object Oriented Programming.
a. Polymorphism b. Encapsulation c. Abstraction d. class
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. Name the Application program that is written and compiled which may then be executed
in any machine provided it contains the JVM.
a. Applets b. Applications c. Both a and b d. None of these
viii. What is the extension of a source code in Java?
a. .java b. .class c. Both a and b d. None of these
ix. 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
x. A program that translates code written in a high-level language into machine code is called
a. Assembler b. Linker c. Compiler d. None of these
Page 1 of 2
Group: C (Answer any three) (10X3=30)
3. i). Write a program that computes tax for income of Rs 10,25,450. The income upto Rs
3,00,000 is not taxable and the tax is computed as 17% of the taxable income.
ii). Write a program to calculate the distance of 2096 feet in terms of yards and miles. Given
fixed values are 1 mile = 1760 yards and 1yard = 3 feet.
iii). Write a program to find the area, perimeter and diagonal of a square. Display the output
of the program by taking side of a square as 65.
iv). A seller allows his customer two successive discounts of 20% and 10%. If the article costs
Rs 8,250, write a program to calculate and display the selling price and the total discount
given by the seller.
---------------------------------------------------------END------------------------------------------------------------
Page 2 of 2