UNIT-1: Basics of OOP

burgerraraSoftware and s/w Development

Nov 18, 2013 (3 years and 6 months ago)

103 views

ST. ANN’S COLLEGE OF

ENGINEERING &TECHNOL
OGY: CHIRALA

DEPARTMENT OF COMPUT
ERSCIENCE & ENGINEER
ING


Subject: OBJECT ORIENTED PROGRAMMING THROUGH JAVA

Name:

CH.VIJAYANADA RATHNAM&
P.NEELIMA

Year & Sem/Section: II
-
II SEM
A&B


ASSIGNMENTS

UNIT
-
1:

Basics of OOP

1. E
xplain the importance of
Object Oriented paradigm.

2. Describe the components of object oriented world.

3. Write short notes on:



(a).

C
lasses and instances


(b).
M
ethod binding.

4.
Explain the Abstraction
mechanisms supported by Object Oriented paradigm
.

5.

Explain: (a) Dynamic binding


(b) Message passing.

6
.

Write the difference between Data abstraction and data encapsulation

7. Explain about Inheritance and polymorphism


UNIT
-
2
:

Java Basics

1. Distinguish the following terms.


(a) Objects and classes. (b) Data abstraction and Data encapsulation.

2. Explain different abstraction mechanisms possible in object oriented programming.


3. Distinguish the following term
s.


(a) Inheritance and Polymorphism. (b) Dynamic binding and message passing.

4. What does tostring () method returns? How is it handled in Java? Explain with an

Example.

5
. How many Data types are in java? Explain with ranges.

6
.

(a)
Write a Java program that implements Linear Search?




(b) What does System.out.println in Java?

7
.

What does tostring() method returns? How is it handled in Java? Explain with an

example.



UNIT
-
3
:

Inheritance

1.

What is an abstract class? What is its
importance? How is it designed in java?

2.

How the keyword ‘final’ ca
n be used to prevent Overriding
?
Explain w
ith an

e
xample

3.

What is the mechanism by which a call to an overridden method is resolved at

Runtime?
Explain with an example.

4.

What are the types of

inheritances in java? Explain each of them in detail.

5.

Explain in detail about benefits of inheritance and costs of inheritance


6.

How the keyword ‘Super’ can be used explain with example
.

7.

(a) D
iscuss about Hybrid Inheritance with a suitable example.

(b) Discuss about Hierarchical Inheritance with a suitable example.

8. (a) Explain about final classes, final methods and final variables?

(b) Explain about the abstract class with example
program?



UNIT
-
4:

Packages and Interfaces

1.
Define Package.
What are the Packages provided by java API? Explain.

2.
Write Java code to obtain Date and Time.

3.
Explain Buffered Reader and BufferedWriter

classes from I package with an
exam
ple.


4.
Explain FileInputStream and FileOutputStream with an example for each.

5. How to set CLASSPATH. Explain in detail?

6. Define interface.How to implement & extending interfaces in java.

7
. Difference b/w classes an
d interfaces?

8.

Write a sample program to illustrate packages.


UNIT
-
5:

Exception handling and multithreading


1. (a) What is a thread? Explain the concept of a Multithread Programming.


(b) Describe the life cycle of a thread?

2. In JAVA, is
exception handling implicit or explicit or both. Explain with the help of
example java programs.

3. What are Checked Exceptions and Unchecked Exceptions? Explain some of

These
exceptions with an example and also give the differences between them.

4. List &

explain the various methods defined by the thread class with examples of

each?

5.
What is an Exception? Explain the usage of try, catch, throw, throws and finally keywords
with example.

6. (a). Explain thread life cycle


(b). Define synchronizing threa
d and daemon threads.

7.

(a) Give the Class hierarchy in Java related to exception handling. Briefly explain each class.


(b) What is the necessity of exception handling? Explain exception handling taking “divide
-
by
-


zero” as an example.

8.

(a) Explain how threads with different priorities execute in environment which supports
priorities and which doesn’t support priorities.


(b) what are the functions available in java related to priority.


UNIT
-
6:

Applets

1.

(a). What is an
Applet?Explain the types of applets

(b). creating applets with example.

2.

Explain the differences b/w the applets and application Programs.

3.

Explain the life cycle of an applet.

4.

(a).Write short notes on passing parameters to applets

(b).
Describe

Applet t
o Applet communication

and
secure applet


UNIT
-
7
:

Event Handling

1. (a) Explain the reason of creating a subclass of Frame is preferred over creating

an
instance of

Frame when creating a window.


(b) Explain the steps in creating a subclass of frame with the help of examples.

2. Describe the ActionEvent
,
the AdjustmentEvent, the ComponentEvent and the



ContainerEvent classes along with their methods and constructors.

3. Define Abstrac
t class and Interface and what is the difference between them explain

with

suitable examples.

4. Briefly explain the following terms:


(a) Component. (b) Container. (c) Panel. (d) Window.


5
.

Write a stand
-
alone AWT based application which creates a frame window that responds
to

mouse clicks and key strokes.

6
. (a) What are the advantages of Layout managers? Why Java prefers Layout managers
instead of fixing th
e component by x & y Coordinates? What are the different Layout
managers AWT supports?


(b) What is preferred size of a component and how it is related to the LayoutManagers.

7
. (a) In what way JList differ from JComboBox?


(b) JList does not support

scrolling. Why? How this can be remedied? Explain

with an
example.

8
. What are various JFC containers? List them accor
ding to their functionality. Ex
plain each
of them with examples.

What are the methods supported by the following interfaces. Explain ea
ch of them


(a) ActionListener interface (b) MouseMotionListener interface (c) TextListener interface.

9. How will you create check boxes and Choice boxes? Explain the steps in detail.



UNIT
-
8:

Swing
s

1. Define swing? And what

are the limitations of AWT?

2. Explain the MVC architecture
.

3.
Explain trees and tables.

4.
What are various JFC containers? List them according to their functionality. Explain each of


them with examples.

5.(a) In what way JList differ from
JComboBox?


(b) JList does not support scrolling. Why? How this can be remedied? Explain with an
example.

6. Explain the steps involved in creating JCheckBox, JRadioButton, JButton, JLabel

7. Differentiate following with suitable examples:



(a) Frame, JFrame


(b) Applet, JApplet


(c) Menu, Jmenu