0% found this document useful (0 votes)
12 views

CO225: Software Construction

The document discusses 15 questions about object-oriented programming principles, classes, inheritance, polymorphism, encapsulation and other Java concepts. The questions cover topics like OOP principles, classes vs objects, static vs final keywords, abstract classes vs interfaces, polymorphism types, multithreading and thread creation, multiple inheritance, method overloading, constructors, calling base class methods, inheritance and method access, encapsulation advantages, and differences between public and public final classes.

Uploaded by

lakshitha srimal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CO225: Software Construction

The document discusses 15 questions about object-oriented programming principles, classes, inheritance, polymorphism, encapsulation and other Java concepts. The questions cover topics like OOP principles, classes vs objects, static vs final keywords, abstract classes vs interfaces, polymorphism types, multithreading and thread creation, multiple inheritance, method overloading, constructors, calling base class methods, inheritance and method access, encapsulation advantages, and differences between public and public final classes.

Uploaded by

lakshitha srimal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CO225: Software Construction

Tutorial 1

Answer the following questions. These are typical questions asked during interviews.

1. What are the OOP principles?

2. What is a class? What is the difference between a class and an object?

3. Explain the difference between final and finally keyword.

4. What does the static keyword mean in Java?

5. Explain the difference between interface and abstract class. Give two examples of where
you would use an abstract class and interface.

6. What are the two types in Polymorphism? (was not discussed in lectures. Search)

7. What is multi threading? Why is the use of it?

8. What are the two types in thread creation? Why there are two types there?

9. Is multiple inheritance allowed in Java? What are the difficulties in multiple inheritance?

10. What is overloading and what are the advantages of overloading?

11. How many constructors can be there for a single class?

12. How to call a method in a base class without creating an instance of that class?

13. Given 3 classes, A, B, C and methodA() and methodB() in classes A and B respectively, how
can you make sure that these 2 methods are available for use in class C?

14. Explain the advantages of encapsulation.

15. What is the difference between public class and public final class?

Discussion date: 25th August 2017


Text
Facilitator: Dr. Janaka Alawathugoda

You might also like