END TERM EXAMINATION
FOURTH SEMESTER [BCA] MAY 2017
Paper Code: BCA-206
Subject: Java Programming
Time: 3 Hours
Maximum Marks: 75
Note: Attempt any five questions including Q no.1 which is compulsory.
- Q1. Answer the following:- (5x5=25)
- (a) What is type casting? Illustrate with example what is meant by Automatic type promotion.
- (b) What is delegation event model?
- (c) Discuss the uses of 'throw' and 'throws' keywords.
- (d) Explain the different uses of 'super' keyword.
- (e) Explain the lifecycle of an applet.
- Q2. (a) Explain why the main function is declared as "public static void main (String args[])"? (4)
- (b) List and explain any 8 Java buzzwords. (4)
- (c) List and explain the OOP principles. (4.5)
- Q3. (a) What is a Package? Discuss with suitable example the steps involved in creating and using packages. (6.5)
- Q4. (a) What are interfaces? What are their benefits? Give the general form of a class that implements interfaces. (6)
- (b) Write a Java class called as SavingsAccount with members as AccountNo, Balance. Provide depositAmount() & withdrawAmount() functions. If user tries to withdraw more money than his balance, then throw a User Defined Exception. (6.5)
- Q5. (a) Explain the different ways of creating threads in java with syntax. (6)
- (b) How shared object can be protected from multiple access of threads? (6.5)
- Q6. (a) Bring out the differences between AWT and Swings using suitable example. (6)
- (b) Discuss various layout managers available in AWT. (6.5)
- Q7. (a) Write a program to illustrate BufferedInputStream and BufferedOutputStream class. (6)
- (b) Compare byte stream class and character stream class. (6.5)
- Q8. Write short notes on the following: (3, 3, 3, 3.5)
- (a) JDBC architecture
- (b) Adapter classes
- (c) Applets and comparison with application program
- (d) Check box and choice list