Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
r05312203 Oop Through Java

r05312203 Oop Through Java

Ratings: (0)|Views: 18|Likes:
Published by Srinivasa Rao G

More info:

Published by: Srinivasa Rao G on Jan 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/16/2009

pdf

text

original

 
Code No: R05312203
Set No. 1
III B.Tech I Semester Regular Examinations, November 2007OOP THROUGH JAVA(Instrumentation & Control Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) How is java more secured than other languages?(b) What is multithreading? How does it improve the performance of java?(c) Write a program to nd factorial of a given number. [4+4+8]2. (a) What is a constructor? What are its special properties?(b) How do we invoke a constructor?(c) What are objects? How are they created from a class? [6+4+6]3. Create a 3-level inheritance hierarchy. Each class in the hierarchy should have afinalize( ) method, and it should properly call the base-class version of finalize( ).Demonstrate that your hierarchy works properly. [16]4. What is Multiple Inheritance? Explain how it cam be implemented in Java withthe help of an example. [16]5. (a) When do you use Nested try statements. Explain nested try statements withthe help of an example java program.(b) Explain nested try statements in the context of method calls with the help of an example java program. [8+8]6. (a) Write a java program which draws a dashed line and dotted line using applet.(b) Write a java program to draw a polygon of eight edges. [10+6]7. What are various JFC containers? List them according to their functionality. Ex-plain each of them with examples. [16]8. Briey explain various functions of Math class. [16]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
 
Code No: R05312203
Set No. 2
III B.Tech I Semester Regular Examinations, November 2007OOP THROUGH JAVA(Instrumentation & Control Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) List at least ten major differences between C and Java(b) Compare in terms of their functions, the following pairs of statements:i. while and do?.whileii. while and for(c) What is an empty statement? Explain its usefulness. [4+4+4+4]2. (a) What is a constructor? What are its special properties?(b) How do we invoke a constructor?(c) What are objects? How are they created from a class? [6+4+6]3. (a) Explain about final classes,final methods and final variables?(b) Explain about the abstract class with example program? [8+8]4. Create an interface with at least one method, in its own package. Create a class ina separate package. Add a protected inner class that implements the interface. Ina third package, inherit from your class and, inside a method, return an object of the protected inner class, upcasting to the interface during the return. [16]5. (a) What is multithreading? What are its advantages?(b) compare process based and thread based multitasking. [6+10]6. What is Event listener? Explain the different Event Listener interfaces supportedby java and their purpose. [16]7. (a) Explain the application services that can be used in JFC components.(b) What is double buffering? What purpose does it serve? Explain with a javaskeleton code. 8+8]8. (a) How does Random class generate pseudo random numbers?(b) Write a program to generate a set of random numbers. Find its sum andaverage. The program should also display * based on the random numbersgenerated. [8+8]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
 
Code No: R05312203
Set No. 3
III B.Tech I Semester Regular Examinations, November 2007OOP THROUGH JAVA(Instrumentation & Control Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Describe the genesis of java. Also write brief overview of java.(b) Write a program to convert the given temperature in Fahrenheit to Celsius us-ing the following conversion formula C = (F - 32)/1.8 And display the valuesin a tabular form. [8+8]2. (a) When do we declare a method or class final?(b) When do we declare a method or class abstract?(c) Describe different levels of access protections available in java. [4+4+8]3. (a) Explain about final classes,final methods and final variables?(b) Explain about the abstract class with example program? [8+8]4. Write an interface called shape with necessary methods.Derive classes circle, rec-tangle, triangle, cone, sphere and cube with appropriate constructors and methodsfor area, volume also setting & displaying. [16]5. (a) In Java, why finally keyword is necessary in exception handling.(b) Explain finally block in exception handling with the help of an example.[4+12]6. Explain in detail about the following event classes:(a) ComponentEvent(b) ContainerEvent(c) FocusEvent. [6+5+5]7. (a) Write briefly applet display methods.(b) Write a java program to form a calculator. [8+8]8. Explain connection less client/server interaction with datagrams in detail. Givesuitable example. [16]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->