Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
||Jai Sri Gurudev||
S.J.C. Institute of Technology, Chickaballapur
Department of Computer Science &Engineering Subject Name & Code: Object Oriented Programming with Java (BCS306A) Semester: 3rd Semester A, B & C TUTORIAL-2 Answer the following questions
1. Illustrate usage of super keyword in Java With suitable Example
2. Compare and Contrast Method Overloading and Overriding with Suitable example. 3. Define inheritance? List and explain Different types of inheritance in java 4. Develop a JAVA program to create a class named shape. Create three sub classes namely: Circle, triangle and square, each class has two member functions named draw () and erase (). Demonstrate polymorphism concepts by developing suitable methods, defining member data and main program. 5. Examine the various levels of Access Protection available for Packages and their implications with suitable example. 6. Explain how an interface is used to achieve multiple Inheritances in Java. 7. What is abstract class and abstract method? Explain with an example. 8. Define package. Explain the steps involved in creating a user-defined package with an example. 9. Explain the concept of importing packages in Java and provide an example demonstrating the usage of the import statement. 10. Demonstrate the working of final class and final method in JAVA. 11. Demonstrate dynamic dispatch using abstract class in JAVA. 12. Create a Java program to define a package named mypack and demonstrate its implementation by importing it into an appropriate class 13.Explain how to use Default, private and Static method in an interface 14.Write a Program to Demonstrate Constructor overloading. 15.Develop a JAVA program to create an interface Resizable with methods resize Width (int width) and resize Height (int height) that allow an object to be resized. Create a class Rectangle that implements the Resizable interface and implements the resize methods.