RR
Code No: 27038
Set No - 1
in
IV B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009 TRANSPORT PHENOMENON Chemical Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? [16]
2. Design an applet to create a menu bar and pull down menus.
[16]
File Open New
Edit Undo Cut
ld .
1. Show how and why, HTML file is used in an applet. With an example.
View Normal Tool bar
3. (a) Distinguish between instance methods and class methods.
[4]
[4]
(c) What is the difference between a method and a program?
[4]
or
(b) Discuss about class variable with an example.
(d) The variables System.in and System.out are static public variables. Is it possible to override them? If so, how? [4]
uW
4. (a) What is a stream? What are the types of streams defined in Java2? Explain in brief? [8] (b) Explain the following: i. BufferedReader ii. BufferedWriter.
[4] [4]
5. (a) A Super class variable can reference a subclass object. Justify you answer with example program. [8]
nt
(b) Define reusable classes based on inheritance and abstract classes and abstract methods. [8]
Aj
6. (a) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } statement4; Answer the following and justify your answer. i. Will the statement3 be executed? ii. If the exception is not caught, will statement4 be executed? 1
Code No: 27038
RR
Set No - 1
iii. If the exception is caught in the catch clause, will statement4 be executed? iv. If the exception is passed to the caller, will statement4 be executed? [6]
Will statement5 be executed? If the exception is of type Exception3, what will happen? Will statement5 be executed? Will statement4 be executed?
or
i. ii. iii. iv.
ld .
in
(b) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } catch(Exception3 e3) {throw e3; } finally {statement5;} statement4; Answer the following and justify your answer?
[5]
nt
uW
(c) Write the output of the following program? import java.io.File; class Demo { static void p(String s) { System.out.println(s); } public static void main(String args[ ]) { File f1 = new File(“ /java/COPYRIGHT”); p(“\n Name:”+f1.getName( )); p(“\n Parent:”+f1.getParent( )); p(f1.exists( ) ? “ is writeable” : “ is not writeable”); p(f1.canRead( ) ? “is readable” : “is not readable”); } }
[5]
7. (a) Describe the arguments used in the method drawRoundRect ( )
Aj
(b) Explain the purpose of each argument used in the method draw Arc( )
8. (a) Write the different kinds of arithmetic and relational operators in Java. (b) Discuss the package java.lang in detail. ?????
2
[8] [8] [8] [8]
Code No: 27038
RR
Set No - 2
in
IV B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009 TRANSPORT PHENOMENON Chemical Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) What is a stream? What are the types of streams defined in Java2? Explain in brief? [8]
ld .
(b) Explain the following: i. BufferedReader ii. BufferedWriter.
[4] [4]
2. (a) Distinguish between instance methods and class methods.
or
(b) Discuss about class variable with an example.
(c) What is the difference between a method and a program?
[4]
[4]
[4]
(d) The variables System.in and System.out are static public variables. Is it possible to override them? If so, how? [4]
uW
3. (a) Write the different kinds of arithmetic and relational operators in Java. (b) Discuss the package java.lang in detail. 4. (a) Describe the arguments used in the method drawRoundRect ( ) (b) Explain the purpose of each argument used in the method draw Arc( ) 5. Show how and why, HTML file is used in an applet. With an example.
[8] [8] [8] [8] [16]
nt
6. (a) A Super class variable can reference a subclass object. Justify you answer with example program. [8] (b) Define reusable classes based on inheritance and abstract classes and abstract methods. [8]
Aj
7. (a) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } statement4; Answer the following and justify your answer. i. Will the statement3 be executed? 3
RR
Code No: 27038
Set No - 2
ii. If the exception is not caught, will statement4 be executed? iii. If the exception is caught in the catch clause, will statement4 be executed? iv. If the exception is passed to the caller, will statement4 be executed? [6]
Will statement5 be executed? If the exception is of type Exception3, what will happen? Will statement5 be executed? Will statement4 be executed?
or
i. ii. iii. iv.
ld .
in
(b) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } catch(Exception3 e3) {throw e3; } finally {statement5;} statement4; Answer the following and justify your answer?
[5]
nt
uW
(c) Write the output of the following program? import java.io.File; class Demo { static void p(String s) { System.out.println(s); } public static void main(String args[ ]) { File f1 = new File(“ /java/COPYRIGHT”); p(“\n Name:”+f1.getName( )); p(“\n Parent:”+f1.getParent( )); p(f1.exists( ) ? “ is writeable” : “ is not writeable”); p(f1.canRead( ) ? “is readable” : “is not readable”); } }
[5]
Aj
8. Design an applet to create a menu bar and pull down menus. File Open New
Edit Undo Cut
?????
4
View Normal Tool bar
[16]
RR
Code No: 27038
Set No - 3
1. Design an applet to create a menu bar and pull down menus. Edit Undo Cut
View Normal Tool bar
[16]
ld .
File Open New
in
IV B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009 TRANSPORT PHENOMENON Chemical Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ?????
2. (a) Distinguish between instance methods and class methods.
[4]
[4]
(c) What is the difference between a method and a program?
[4]
or
(b) Discuss about class variable with an example.
(d) The variables System.in and System.out are static public variables. Is it possible to override them? If so, how? [4]
uW
3. (a) A Super class variable can reference a subclass object. Justify you answer with example program. [8] (b) Define reusable classes based on inheritance and abstract classes and abstract methods. [8] 4. (a) What is a stream? What are the types of streams defined in Java2? Explain in brief? [8] (b) Explain the following:
nt
i. BufferedReader ii. BufferedWriter.
5. Show how and why, HTML file is used in an applet. With an example. 6. (a) Write the different kinds of arithmetic and relational operators in Java.
Aj
(b) Discuss the package java.lang in detail.
7. (a) Describe the arguments used in the method drawRoundRect ( ) (b) Explain the purpose of each argument used in the method draw Arc( )
[4] [4] [16] [8] [8] [8] [8]
8. (a) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } 5
Code No: 27038
RR
Set No - 3
catch(Exception1 e1) { } catch(Exception2 e2) { } statement4; Answer the following and justify your answer. Will the statement3 be executed? If the exception is not caught, will statement4 be executed? If the exception is caught in the catch clause, will statement4 be executed? If the exception is passed to the caller, will statement4 be executed? [6]
in
i. ii. iii. iv.
Will statement5 be executed? If the exception is of type Exception3, what will happen? Will statement5 be executed? Will statement4 be executed?
uW
i. ii. iii. iv.
or
ld .
(b) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } catch(Exception3 e3) {throw e3; } finally {statement5;} statement4; Answer the following and justify your answer?
Aj
nt
(c) Write the output of the following program? import java.io.File; class Demo { static void p(String s) { System.out.println(s); } public static void main(String args[ ]) { File f1 = new File(“ /java/COPYRIGHT”); p(“\n Name:”+f1.getName( )); p(“\n Parent:”+f1.getParent( )); p(f1.exists( ) ? “ is writeable” : “ is not writeable”); p(f1.canRead( ) ? “is readable” : “is not readable”); } } ?????
6
[5] [5]
RR
Code No: 27038
Set No - 4
1. Design an applet to create a menu bar and pull down menus. Edit Undo Cut
View Normal Tool bar
[16]
ld .
File Open New
in
IV B.Tech I Semester Supplimentary Examinations,Nov/Dec 2009 TRANSPORT PHENOMENON Chemical Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ?????
2. (a) Distinguish between instance methods and class methods.
[4]
[4]
(c) What is the difference between a method and a program?
[4]
or
(b) Discuss about class variable with an example.
(d) The variables System.in and System.out are static public variables. Is it possible to override them? If so, how? [4]
uW
3. (a) A Super class variable can reference a subclass object. Justify you answer with example program. [8] (b) Define reusable classes based on inheritance and abstract classes and abstract methods. [8] 4. (a) What is a stream? What are the types of streams defined in Java2? Explain in brief? [8] (b) Explain the following:
nt
i. BufferedReader ii. BufferedWriter.
5. Show how and why, HTML file is used in an applet. With an example. 6. (a) Write the different kinds of arithmetic and relational operators in Java.
Aj
(b) Discuss the package java.lang in detail.
[4] [4] [16] [8] [8]
7. (a) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } statement4; Answer the following and justify your answer. 7
Code No: 27038 i. ii. iii. iv.
RR
Set No - 4
Will the statement3 be executed? If the exception is not caught, will statement4 be executed? If the exception is caught in the catch clause, will statement4 be executed? If the exception is passed to the caller, will statement4 be executed? [6]
Will statement5 be executed? If the exception is of type Exception3, what will happen? Will statement5 be executed? Will statement4 be executed?
uW
i. ii. iii. iv.
or
ld .
in
(b) Suppose that statement2 causes an exception in the following try-catch block: try{ statement1; statement2; statement3; } catch(Exception1 e1) { } catch(Exception2 e2) { } catch(Exception3 e3) {throw e3; } finally {statement5;} statement4; Answer the following and justify your answer?
nt
(c) Write the output of the following program? import java.io.File; class Demo { static void p(String s) { System.out.println(s); } public static void main(String args[ ]) { File f1 = new File(“ /java/COPYRIGHT”); p(“\n Name:”+f1.getName( )); p(“\n Parent:”+f1.getParent( )); p(f1.exists( ) ? “ is writeable” : “ is not writeable”); p(f1.canRead( ) ? “is readable” : “is not readable”); } }
Aj
8. (a) Describe the arguments used in the method drawRoundRect ( ) (b) Explain the purpose of each argument used in the method draw Arc( ) ?????
8
[5] [5]
[8] [8]