VTU Previous Year Question Papers BE CS Seventh Semester
Java and J2EE Dec 2010
Note: Answer any FIVE full questionsselecting at least TWO questions from each part.
1 a. Briefly explain any six key considerations used for designing JAVA language.
b. Discuss three OOP principles.
c. How “compile once and run anywhere” is implemented in JAVA language?
d. List down various operators available in JAVA language.
2 a. Differentiate C++ language and JAVA language with respect to inheritance, and also mention the use of super and this in JAVA inheritance.
b. Discuss the following:
i) Inner classes ii) Overriding and overloading.
c. Briefly explain the role of interfaces while implementing multiple inheritances in JAVA.
d. Write a JAVA applet which continuously plays an audio clip named “anthem.wav” loaded from applets parent directory. Provide the necessary HTML file to run this applet.
3 a. What are threads? Provide any two typical applications where multithreaded programming is used.
b. Provide JAVA syntax for the following with examples:
i) Making classes thread able ii) Extending threads
iii) Synchronization iv) Catching interrupt
c. Write a JAVA program, which creates two threads, one thread displays “VTU – Belgaum” for every 100 seconds, and another thread displays “Karnataka” for every 50 seconds, continuously.
d. Define the delegation event model. Briefly explain the role of:
i) Event classes ii) Event listener interfaces
iii) Source of events iv) Adapter clauses.
4 a. What are swings? Provide any two typical applications of swings.
b. Explain various components of the swing package.
c. Write a JAVA swing applet, which accepts a text from a J text field, and displays the same text with selected font size and font color using J label.
d. Write the purpose of the following swing components :
i) Jlabel ii) JTabbedpane iii) JScroIlpane iv) JCombobox
5 a. Explain the working of JDBC.
b. What are database drivers? Mention different types of drivers used in JDBC.
c. Provide various classes, interfaces and exceptions available under JAVA sql package., along with their purpose.
d. Give the JAVA syntax for the following :
i)Connecting to a database using JDBC/ODBC bridge, which has url ~ “jdbc : odbc : SDB”, Username = “scott” and password = “tiger”.
ii) Running a query “select emp-age from emp” over that connected database.
iii) Counting number of employees, with the condition emp – age > 50.
6 a. What are servlets? Briefly explain the application of servlets in web programming.(04 Marks)
b. Explain the life cycle of a servlet.
c. Write a JAVA servlets which reads two parameters from the webpage, say, value 1 and value 2, which are of type integers, and finds the sum of the two values, and return back the result as a webpage.
d. Provide JAVA syntax for the following :
i) Handling HTTP requests and responses
ii) Using cookies
iii) Session tracking.
7 a. Mention the purpose of use of JSP and JAVA RMI.
b. Explain any four JSP tags.
c. Briefly explain the working of JAVA RMI programs, by mentioning its steps.
d. What are the differences between server side and client side JAVA RMI?
8 a. Briefly explain various enterprise-level requirements which are addressed using enterprise
JAVA beans technology.
b. Explain the differences between session beans and entity beans.
c. Mention the applications of a JAR file and deployments descriptors.
d. Provide a JAVA bean class to store customer information, which includes fields like address, name and credit card details. Also include methods to retrieve values from the class about the above mentioned fields.