Object Oriented Programming PCC-CS503
Class Assignment
The assignment is optional, no marks will be awarded for any CA
1. Explain Encapsulation with an example. What are static fields in java. Give an example
2+3
2. What are constructors in java ? Give examples. What is the use of this keyword in java ?
5
3. Explain inheritance with an example. What is the difference between method overloading and
overriding ? How can a class be stopped from being inherited ?
5
4. Explain static and dynamic binding with an example. Why do final methods always use static binding?
3+2
5. Explain the benefits of Interface with an example. How does it differ from Abstract class.
5
6. Illustrate the role of ADT in efficient program design. Design and explain Stack ADT with its operations
(push, pop, peek, isEmpty).
2+3
7. What is the use of super keyword in java. Explain with examples.Why is java platform independent ?
5
8. What are packages in java ? Explain the process of adding a class to a package and that of importing
class from a package
5
9. Explain the various access specifiers in java with examples.
5
10. Discuss the advantages of applying design patterns in object-oriented programming with reference to
the Iterator pattern.
5