Oops with Java(BCS306A)
Assignment -2
1. Which are the restrictions present for static declared methods.
[Link] inheritance and list the different types of inheritance in java.
3. Explain how interface is used to achieve multiple Inheritances in Java.
4. Compare and method overloading and method overriding with suitable example.
5. Write a java program to implement multilevel inheritance with 3 levels of hierarchy.
6. Write a java program to extend interface assuming suitable data.
[Link] the usage of super keyword in java with suitable example, also explain the dynamic
method dispatch.
8. What is single level inheritance? Explain with suitable example.
9. What is meant by interface? State its need and write syntax and features of interface.
10. Explain inheritance and polymorphism features of Java.
11. Build a Java program to create an interface Resizable with method resize (int radius) that allows
an object to be resized. Create a class circle that implements resizable interface and implements the
resize method.
12. Write a Java Program to Demonstrate the Concept of importing Packages
13. Explain method overriding with suitable example.
14. Define a thread, also discuss the different ways of creating a thread with example.
15. What is importance of super keyword in inheritance? Illustrate with suitable example.
16. Write a single program to implement inheritance and polymorphism in java.
17. Explain concept of nesting of interface.
18. Define Exception, Explain Exception handling mechanism provided in Java along with syntax
and example.
19. Define type wrappers, auto-boxing and auto -unboxing with an example.
20. What is abstract class and abstract method? Explain with example.
21. Develop a JAVA program to create an abstract class Shape with abstract
methods calculateArea() and calculatePerimeter(). Create subclasses Circle and
Triangle
that extend the Shape class and implement the respective methods to calculate the Area and
Perimeter.