OOP_02


Just a note

Câu hỏi:

Tổng quan:

  1. OOP weaknesses/ advantage?
  2. procedural / functional / OO: can you describe them?
  3. Why OOP was favored by the industry for so many years?
  4. Tính chất của OOP? Nêu rõ từng tính chất?

Cụ thể:

  1. Explain the term constructor and destructor?
  2. Virtual keyword?
  3. What is the difference between a class and a structure?
  4. When should I use a struct instead of a class?
  5. What is the relationship between a class and an object?
  6. How is method overriding different from method overloading?
  7. Can you specify the accessibility modifier for methods inside the interface?
  8. What exactly is the difference between an interface and abstract class?
  9. What is Coupling in OOP?
  10. What is Cohesion in OOP?
  11. What is a static constructor?
  12. Explain different types of inheritance.
  13. Can you declare an overridden method to be static if the original method is not static?
  14. What is the difference between a mixin and inheritance?
  15. In terms that an OOP programmer would understand (without any functional programming background), what is a monad?
  16. What is LSP (Liskov Substitution Principle) and what are some examples of its use (good and bad)?
  17. Could you elaborate Polymorphism vs Overriding vs Overloading?
  18. What does it mean to “program to an interface”?
  19. Can you provide a simple explanation of methods vs. functions in OOP context?
  20. Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
  21. What is the difference between association, aggregation and composition?
  22. Can you declare a private class in a namespace?
  23. : You have defined a destructor in a class that you have developed by using the C# programming language, but the destructor never executed. Why did the destructor not execute?
  24. How can we call the base method without creating an instance?
  25. What are sealed modifiers?
  26. What is the difference between new and override?
  27. What is early and late Binding?
  28. What is ‘this’ pointer?
  29. What is a pure virtual function?
  30. What are all the operators that cannot be overloaded?
  31. What is dynamic or run time polymorphism?
  32. Do we require a parameter for constructors?
  33. What are a base class, subclass, and superclass?
  34. What is static and dynamic Binding?
  35. Ví dụ về thừa kế, đa thừa kê.
  36. Các câu hỏi về class A và class B.

Tham khảo:

  1. Top 50 OOPs Interview Questions & Answers
  2. Commonly Asked OOP Interview Questions | Set 1
  3. 40 Advanced OOP Interview Questions and Answers