0% found this document useful (0 votes)
183 views3 pages

Question Paper Code:: (10×2 20 Marks)

The document is a question paper for an examination on object oriented programming in Java. It contains 3 parts with multiple choice and long answer questions. Part A contains 10 short answer questions worth 2 marks each. Part B contains 5 long answer questions worth 13 marks each. Topics include OOP concepts in Java like inheritance, interfaces, exceptions and file handling. Part C contains 1 long answer question worth 15 marks to write a GUI application or address book class in Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views3 pages

Question Paper Code:: (10×2 20 Marks)

The document is a question paper for an examination on object oriented programming in Java. It contains 3 parts with multiple choice and long answer questions. Part A contains 10 short answer questions worth 2 marks each. Part B contains 5 long answer questions worth 13 marks each. Topics include OOP concepts in Java like inheritance, interfaces, exceptions and file handling. Part C contains 1 long answer question worth 15 marks to write a GUI application or address book class in Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Reg. No.

:
*X10313*

Question Paper Code : X 10313


B.E./B.Tech. Degree Examinations, november/decembeR 2020/
APRIL/MAY 2021
Third/Fourth/Fifth Semester
Computer Science and Engineering
cs 8392 – object oriented programming
(Common to : Computer and Communication Engineering/Electrical and
Electronics Engineering/Electronics and Communication Engineering/Electronics
and Instrumentation Engineering/Electronics and Telecommunication
Engineering/Instrumentation and Control Engineering/Information Technology)
(Regulations 2017)

Time : Three Hours Maximum : 100 Marks

Answer all questions


Part – A (10×2=20 Marks)
1. Define encapsulation in Java.
2. What is a constructor ?
3. Exemplify the use of super keyword.
4. What are the differences between classes and interfaces ?
5. What is the purpose of finally clause ? give example.
6. What are the uses of streams. What are the two types of streams ?
7. What is the need for synchronization ? How it can be implemented ?
8. How to create a single class, which automatically works with different types of
data ? Give example.
9. Write the sequence in which method calls takes place when an applet is terminated ?
Define those methods.
10. What are the two key features of swing ?

Part – B (5×13=65 Marks)


11. a) i) How Java changed the internet ? (9)
ii) If semicolons are needed at the end of each statement, why does the comment
line not end with a semicolon ? (4)
(OR)
b) What are the three categories of control statements used in Java ? Explain
each category with example. (13)
X 10313 -2- *X10313*

12. a) Write a Java program to calculate electricity bill using inheritance. The program
should get the inputs of watts per hour and unit rate.

Check your program for the following case :

Assume a consumer consumes 5000 watts per hour daily for one month. Calculate
the total energy bill of that consumer if per unit rate is 7 [1 unit = 1k Wh]. (13)
(OR)
b) What is interface ? With an example explain how to define and implement
interface. (13)

13. a) Write a short note on the following topics :

• Uncaught exceptions. (3)

• Difference between throw and throws. Give example for both. (5)

• Chained exceptions. Give example. (5)


(OR)
b) How to perform reading and writing files ? Explain with example. (13)

14. a) Discuss the different states of thread in detail. (13)


(OR)

b) i) What is the purpose of thread priorities ? What are the different thread
priorities that exist ? (5)

ii) What are bounded types ? Why it is used ? Give example. (8)

15. a) i) List any five different user interface components that can generate the
events. (5)

ii) Demonstrate any four mouse event handlers with example. (8)
(OR)
b) Describe how to work with graphics to display information within window. (13)
*X10313* -3- X 10313

Part – C (1×15=15 Marks)

16. a) Write an AWT GUI application (called AWT counter) as shown in the Figure 1.
Each time the “Count” button is clicked, the counter value shall increase by 1.

Figure 1
(OR)
b) Write an addressbook class that manages a collection of person object. An
addressbook will allow a person to add, delete, or search for a person object in
the address book.
• Add method : It should add a person object to the addressbook.
• Delete method: It should remove the specified person object from the book.
• Search method: It searches the address book for a specified person and returns
the list of persons matching the specified criteria. The search can be done either
by first name, last name or person id.

–––––––––––––

You might also like