Department of Information Technology & Computer Technology MSBTE Class Test-I, August - 2008 Semester : - Fifth Master: ‘C’ Course : - IF / CM Subject : - Java Programming (JPR) Subject Code : - 9113 Duration : - 1 Hour Max. Marks : - 20 = = = = = = = = = = = = = Instructions to candidate:- 1) All questions are compulsory. 2) Illustrate your answers with neat sketches/flowcharts wherever necessary. 3) Use of Non-programmable Electronics Calculator is permissible. 4) Figures to the right indicate full marks of respective questions. 5) Assume suitable additional data, if necessary. Q.1 Attempt any Two. (2 × 4) 08 a) What are the naming convention rules for a Java identifier? b) Explain the concept of manual and automatic type casting. Why it is required in the programming? c) Explain the differences between method overriding and overloading.
Q.2 Attempt any Two. (2 × 6) 12
a) Give the syntax and use of following methods. i. insertElementAt( ) ii. compareTo( ) iii. isInfinite( ) b) Implement a stack using vector. Implement all basic operations on vector c) Define a class ‘Employee’ having data members name and basic-salary. Also declare an interface ‘Gross’ having method to calculate gross salary. Derive a class ‘Salary’ using class ‘Employee’ and interface ‘Gross’ and display the name, basic-salary and gross-salary.