You are on page 1of 8

JAVA PROGRAMMING AND WEB DESIGN 78

END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMINA AA AATION TION TION TION TION
FIFTH SEMESTER [B.TECH.], DECEMBER 2009 FIFTH SEMESTER [B.TECH.], DECEMBER 2009 FIFTH SEMESTER [B.TECH.], DECEMBER 2009 FIFTH SEMESTER [B.TECH.], DECEMBER 2009 FIFTH SEMESTER [B.TECH.], DECEMBER 2009
JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303)
Time : 3 hours Maximum Marks : 75
Note: Attempt any five questions in all. Q. No. 1 is compulsory. Attempt one question from each unit.
Question 1. _____________________________________________________________________________________
(a) Explain Garbage collection mechanism in Java ? (10 2.5 = 25) [Refer to Page 24]
(b) Differentiate throw and throws clause in exception. [Refer to Page 24]
(c) What is the difference between applet and servlet ? [Refer to Page 44]
(d) Why swings are light weight components ? [Refer to Page 45]
(e) Why do you use jar and manifest file ? [Refer to Page 25]
(f) What is the difference between doGet ( ) and doPost ( ) method. [Refer to Page 45]
(g) Write a program to show inheritance concept in interface. [Refer to Page 3]
(h) What is the difference between list and set interfaces. [Refer to Page 25]
(i) Write a program to show dynamic method dispatch concept. [Refer to Page 3]
(j) How many types of streams are supported in java ? Explain the topmost classes in different types of streams.
[Refer to Page 26]
UNIT-I
Question 2. _____________________________________________________________________________________
(a) What are the main features of java programming langauge ? Give the advantages of java over C++. ( 6. 5)
[Refer to Page 4]
(b) Simulate a calculator using switch statement. (6) [Refer to Page 6]
Question 3. _____________________________________________________________________________________
(a) Write a program to differentiate access modifiers. (6.5) [Refer to Page 6]
(b) Briefly explain each of the following java terms : ( 6)
(i) String and String buffer [Refer to Page 8]
(ii) Abstract and final [Refer to Page 8]
(iii) This and Super. [Refer to Page 9]
UNIT-II
Question 4. _____________________________________________________________________________________
(a) Write a program to display the content of a given file. (6.5) [Refer to Page 26]
(b) Differentiate between the followings : ( 6)
(i) TCP and UDP [Refer to Page 27]
(ii) Reader and Writer class [Refer to Page 28]
(iii) Multithreading and Multiprocessing. [Refer to Page 28]
Question 5. _____________________________________________________________________________________
(a) Write a program to show multithreading concept. (6.5) [Refer to Page 29]
(b) Write a program to show the use of try, catch, throw, throws and finally. (6) [Refer to Page 37]
UNIT-III
Question 6. _____________________________________________________________________________________
(a) Write an applet to illustrate the use of the param tag. (6.5) [Refer to Page 46]
(b) What is the default layout of panel and frame ? Describe any four layouts. (6) [Refer to Page 47]
78
JAVA PROGRAMMING AND WEB DESIGN 79
Question 7. _____________________________________________________________________________________
(a) What do you mean by Java beans. Define serialization and introspection. Write advantages of making beans
over other java programs. (6.5) [Refer to Page 46]
(b) Explain the Delegation Event Model. Explain the life cycle of a Servlet. (6) [Refer to Page 52]
UNIT-IV
Question 8. _____________________________________________________________________________________
(a) Write a short note on electronic mail, internet and intranet services. (6) [Refer to Page 66]
(b) What are the important things you should consider before designing a good website ? ( 6. 5)
[Refer to Page 67]
Question 9. _____________________________________________________________________________________
(a) Write HTML form to show radio bottoms, textboxes, checkboxes, tables submit and reset bottom frames.
(6.5) [Refer to Page 68]
(b) Differentiate between the static and dynamic web page. Write the major features of client side scripting.
Write coding for an interactive web page. (6) [Refer to Page 69]
JAVA PROGRAMMING AND WEB DESIGN 80
END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMINA AA AATION TION TION TION TION
THIRD SEMESTER [B.TECH.], DECEMBER 2010 THIRD SEMESTER [B.TECH.], DECEMBER 2010 THIRD SEMESTER [B.TECH.], DECEMBER 2010 THIRD SEMESTER [B.TECH.], DECEMBER 2010 THIRD SEMESTER [B.TECH.], DECEMBER 2010
JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303)
Time : 3 hours Maximum Marks : 75
Note: Attempt five questions. Select one question from each unit including Q. 1 which is compulsory.
Question 1. _____________________________________________________________________________________
(a) Briefly explain the compilation process of Java Program, by stating the role of class loader byte code
verifier and JSTL. [Refer to Page 20]
(b) What is the difference between widening and narrowing conversion, give an example of both type.
[Refer to Page 21]
(c) Write any five methods with correct signature of Object class. [Refer to Page 38]
(d) What is Anonymous Array illustrate it with the help of a program. [Refer to Page 21]
(e) Give the differences between get and post method of HTTP Request. [Refer to previous questions]
(f) Write the main drawback of Applets. [Refer to Page 59]
(g) What are the basic differences between extending the Thread class and implementing the runnable interface,
in order to create a Thread ? Which one of these you will prefer to create a Thread. [Refer to Page 38]
(h) What will happen when we try to execute the following code ? [Refer to previous questions]
class Temp {
Temp(int x) {
System.out.println(' ' Constructor' ' +x);}
public static void main(String s[]){
Tempt t=new Temp(); }} write you comments for the above code.
(i) Write you comments for the below code [Refer to previous questions]
class Temp {
public static void main (String s[]) {
byte b=10;
byte a=20;
byte c=a+b;
System.out.println(' ' C=' ' +c);} }
(j) Write you Comments for the below code, what will happen when we try to execute the below code
class Tempt {
void show(int x, long y){
System.out.println(' ' I Show Method' ' );}
void show(long x, int y){
System.out.println(' ' II Show Method' ' ); }
public static void main (String s[]){
new Temp(). show(10, 20);}} [Refer to previous questions]
UNIT-I
Question 2. _____________________________________________________________________________________
(a) How ASCII code is different from Unicode, convert A into Unicode format. (6) [Refer to Page 21]
(b) Create a package mypack which will consist a public class named MYSring with a method with signature
as public String myrev(String ss), to reverse a String received in argument of the method. Import your
package in any class and use this package and method in it, avoid the use of built-in method. Also write
the compilation and running syntax of your program. (6.5) [Refer to Page 22]
Question 3. _____________________________________________________________________________________
(a) (i) What is the difference between equals() and == (3*2=6) [Refer to Page 22]
(ii) Describe the distributed and dynamic property of java. [Refer to Page 23]
JAVA PROGRAMMING AND WEB DESIGN 81
(b) (i) What is the difference between JDK and JRE ? How java is platform dependent in case of JRE.
[Refer to Page 19]
(ii) Write a program to multiply two matrices using the concept of Anonymous Array. [Refer to Page 23]
UNIT-II
Question 4. _____________________________________________________________________________________
(a) What i s t he di fference bet ween checked and unchecked Except i on gi ve t he exampl e of bot h t ype of
Exception, How Errors are different from Exception. (6) [Refer to Page 38]
(b) Write a program to implement the custom Exception. Also explain whether the exception created by users
comes under Checked or Unchecked. (6.5) [Refer to Page 38]
Question 5. _____________________________________________________________________________________
(a) Explain the concept of Deadlock write a program to show the deadlock situation in java. ( 6. 5)
[Refer to Page 39]
(b) Write a program to read from console and write these data into a file, again read that file and print the
content onto console. (6) [Refer to Page 39]
UNIT-III
Question 6. _____________________________________________________________________________________
(a) Explain the meaning of abstract in AWT. (3.5) [Refer to Page 59]
(b) Write a program to create the below Structure :
String
Reverse
Show
When user will click on Show button the String Entered in String Text Box Should reverse and will be appear
in Reverse Text Box. (9) [Refer to Page 60]
Question 7. _____________________________________________________________________________________
(a) Give the basic difference between Servlet and Applet,l write the life cycle of Servlet. ( 6)
[Refer to Page 60]
(b) Write a Program to display the Hello Servlet on the webpage using the concept of Servlet, also map
web.xml, and give the directory Structure of your program/files. (6.5) [Refer to Page 61]
UNIT-IV
Question 8. _____________________________________________________________________________________
(a) Write the differences between Servlet and JSP. (6) [Refer to Page 61]
(b) Write a program using HTML to create User Registration form, and Validate the fields using Java Script use
only the (Name (Text Box), Gender (Radio Button), Course (List)) Fields. (6.5) [Refer to Page 74]
Question 9. _____________________________________________________________________________________
(a) Write a JSP page to take the Name of User if it is equals to IPU then Forward a Welcome Page if it is not
equal then forward an Error Page. (6.5) [Refer to Page 75]
(b) Why we prefer scripting languages in order to check the validity of web pages. (6) [Refer to Page 76]
JAVA PROGRAMMING AND WEB DESIGN 82
FIRS FIRS FIRS FIRS FIRST TERM EXAMIN T TERM EXAMIN T TERM EXAMIN T TERM EXAMIN T TERM EXAMINA AA AATION TION TION TION TION
THIRD SEMESTER [B.TECH.], SEPTEMBER 2011 THIRD SEMESTER [B.TECH.], SEPTEMBER 2011 THIRD SEMESTER [B.TECH.], SEPTEMBER 2011 THIRD SEMESTER [B.TECH.], SEPTEMBER 2011 THIRD SEMESTER [B.TECH.], SEPTEMBER 2011
JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303)
Time : 1 hours Maximum Marks : 30
Note: Attempt any five questions. Q. No. 1 is compulsory. Equipped your answer with suitable code.
Question 1. _____________________________________________________________________________________
Explain the main features in java. Why it is mandatory for main method to be declared as public and static ? (6)
[Refer to Page 13]
Question 2. _____________________________________________________________________________________
Write a program to accept int, char, and float values through keyboard. (6) [Refer to previous questions]
Question 3. _____________________________________________________________________________________
Name the interface that is necessary to implement while converting a class into thread. Create three thread child
class and explain how these child thread start executing ? (6) [Refer to Page 34]
Question 4. _____________________________________________________________________________________
Write a program to create your own exception and handle this exception thrown from within a method on invocation. (6)
[Refer to Page 35]
Question 5. _____________________________________________________________________________________
What is interface and how it supports in achieving multiple inheritance. List main differences between interface and
abstract class. (6) [Refer to Page 13]
Question 6. _____________________________________________________________________________________
Write short note on : (1.5 * 4 = 6)
(i) JVM [Refer to Page 14]
(ii) Byte code and Uncode [Refer to Page 14]
(iii) Object class [Refer to Page 14]
(iv) Wrapper class [Refer to Page 14]
JAVA PROGRAMMING AND WEB DESIGN 83
SE SE SE SE SEC CC CCOND TERM EXAMIN OND TERM EXAMIN OND TERM EXAMIN OND TERM EXAMIN OND TERM EXAMINA AA AATION TION TION TION TION
THIRD SEMESTER [B.TECH.], NOVEMBER 2011 THIRD SEMESTER [B.TECH.], NOVEMBER 2011 THIRD SEMESTER [B.TECH.], NOVEMBER 2011 THIRD SEMESTER [B.TECH.], NOVEMBER 2011 THIRD SEMESTER [B.TECH.], NOVEMBER 2011
JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303)
Time : 1 hours Maximum Marks : 30
Note: Attempt five questions. Question number 1 is compulsory..
Question 1. _____________________________________________________________________________________
Write short notes on following : (2 5 = 10)
I. JAR file [Refer to Page 36]
I I . Factory Methods [Refer to Page 36]
III. Manifest file [Refer to Page 37]
I V. MVC [Refer to Page 52]
V. Event delegation model [Refer to Page 52]
Question 2. _____________________________________________________________________________________
Write a program to create a client which first connect to a server, then start sending strings to server and then
server send respond back to the client. When exit is typed at client side, the program terminate. ( 5)
[Refer to Page 52]
Question 3. _____________________________________________________________________________________
What was the problem associated with CGI and how it is tackled by servelet ? Also explain life cycle of servlet. ( 5)
[Refer to Page 53]
Question 4. _____________________________________________________________________________________
What are adapter classes ? Write a program to handle key typed and mouse entered event using adapter classes. (5)
[Refer to Page 54]
Question 5. _____________________________________________________________________________________
Write a program to create three push buttons bearing the name of three different colors. When a button is cliked, that color
should be set as background color in the frame. (5) [Refer to Page 56]
Question 6. _____________________________________________________________________________________
Write a program to create an applet to play an audio file when play button is clicked and stopped when stop button is
clicked. (5) [Refer to Page 57]
JAVA PROGRAMMING AND WEB DESIGN 84
END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMIN END TERM EXAMINA AA AATION TION TION TION TION
FIFTH SEMESTER [B.TECH.], DECEMBER 2011 FIFTH SEMESTER [B.TECH.], DECEMBER 2011 FIFTH SEMESTER [B.TECH.], DECEMBER 2011 FIFTH SEMESTER [B.TECH.], DECEMBER 2011 FIFTH SEMESTER [B.TECH.], DECEMBER 2011
JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303) JAVA PROGRAMMING AND WEBSITE DESIGN (ETIT-303)
Time : 3 hours Maximum Marks : 75
Note: Attempt five questions. Q. No. 1 is compulsory.
Question 1. _____________________________________________________________________________________
(a) What is similarities/difference between an Abstract class and Interface ? (3) [Refer to Page 15]
(b) Suppose a program contains a method with following heading : (2) [Refer to Page 15]
Public static void main(Strings[] args)
(c) How does finally block differ from finalize() method ? (3) [Refer to Page 40]
(d) What is meant by daemon thread ? In java runtime, what is its role ? (3) [Refer to Page 40]
(e) What are different types of inner classes ? (3) [Refer to Page 15]
(f) What are the attributes that make up a DHTML ? (3) [Refer to Page 70]
(g) What is Collection API ? (2) [Refer to Page 40]
(h) What do you understand by Synchronization ? (3) [Refer to Page 40]
(i) How do you submit a form using Javascript ? (1) [Refer to Page 62]
(j) What you add a float, int and byte the result will be _____. (1) [Refer to Page 16]
(k) The 16 bit coding scheme employed in java programming is called _____. (1) [Refer to Page 16]
UNIT-I
Question 2. _____________________________________________________________________________________
(a) What is a constructor ? What are its special properties ? (3) [Refer to Page 16]
(b) What is garbage collection in Java and how can it be used ? (3) [Refer to Page 17]
(c) Explain about final classes, final methods and final variables ? (3.5) [Refer to Page 17]
(d) Explain about the abstract class with example. (3) [Refer to Page 17]
OR
Question 3. _____________________________________________________________________________________
(a) Compare and differentiate overloading and overriding methods. (3) [Refer to Page 18]
(b) What are separators ? Describe the various separators used in Java. (3.5) [Refer to Page 18]
(c) Briefly explain JVM, JDK and JRE. (3) [Refer to Page 19]
(d) How are this() and super() used with constructors ? (3) [Refer to Page 19]
UNIT-II
Question 4. _____________________________________________________________________________________
(a) What are different ways in which a thread can enter the waiting state ? (3) [Refer to Page 40]
(b) What is difference between an Exception and Error in Java ? (3) [Refer to Page 41]
(c) Why do we need run() and start() method both. Can we achieve it with only run method ? ( 3. 5)
[Refer to Page 41]
(d) What is the difference between throw and throws ? (3) [Refer to Page 41]
OR
Question 5. _____________________________________________________________________________________
(a) What are Checked Exceptions and Unchecked Exceptions ? (6) [Refer to Page 42]
(b) Write a program which will result in deadlock ? How will you fix deadlock in Java ? ( 3. 5)
[Refer to Page 42]
(c) What is synchronization in respect to multi-threading ? (3) [Refer to Page 43]
JAVA PROGRAMMING AND WEB DESIGN 85
UNIT-III
Question 6. _____________________________________________________________________________________
(a) Write a program to demonstrate use of JOptionPane for displaying an output message. ( 3)
[Refer to Page 62]
(b) What is the relationship between clipping and repainting ? (3) [Refer to Page 63]
(c) Describe various interfaces and classes from package AWT. (3.5) [Refer to Page 63]
(d) Write an applet which responds to mouse events. (3) [Refer to Page 64]
OR
Question 7. _____________________________________________________________________________________
(a) Explain how to implement an applet into a web page using applet tag ? (3) [Refer to Page 65]
(b) What is the sequence for calling the methods by AWT for applets ? (3.5) [Refer to Page 65]
(c) What is the relationship between an event listener and an event adapter class ? (3) [Refer to Page 65]
(d) What is the difference between scrollbar and scrollpane ? (3) [Refer to Page 65]
UNIT-IV
Question 8. _____________________________________________________________________________________
(a) Create a web page with four frames has picture, second frame has table showing the details of students in
your class, third frame has a list of syllabus of your semester and last frame a hyperlink to a different web
page. (3.5) [Refer to Page 70]
(b) Write a program in JAVASCRIPT to check that the string is palindrome or NOT. (3) [Refer to Page 71]
(c) What is the difference between GET and POST methods ? (3) [Refer to Page 72]
(d) What are differences between DIV and SPAN ? (3) [Refer to Page 72]
OR
Question 9. _____________________________________________________________________________________
(a) What is the difference between undefined value and null value in JAVASCRIPT ? (3) [Refer to Page 73]
(b) What is the importance of the HTML DOCTYPE ? (3.5) [Refer to Page 73]
(c) What is a image sprite ? How is it applied using CSS ? What is the benefit ? (3) [Refer to Page 73]
(d) What is the difference beween == and === ? (3) [Refer to Page 74]

You might also like