OOP_02
Just a note
Câu hỏi:
Tổng quan:
- OOP weaknesses/ advantage?
- procedural / functional / OO: can you describe them?
- Why OOP was favored by the industry for so many years?
- Tính chất của OOP? Nêu rõ từng tính chất?
Cụ thể:
- Explain the term constructor and destructor?
- Virtual keyword?
- What is the difference between a class and a structure?
- When should I use a struct instead of a class?
- What is the relationship between a class and an object?
- How is method overriding different from method overloading?
- Can you specify the accessibility modifier for methods inside the interface?
- What exactly is the difference between an interface and abstract class?
- What is Coupling in OOP?
- What is Cohesion in OOP?
- What is a static constructor?
- Explain different types of inheritance.
- Can you declare an overridden method to be static if the original method is not static?
- What is the difference between a mixin and inheritance?
- In terms that an OOP programmer would understand (without any functional programming background), what is a monad?
- What is LSP (Liskov Substitution Principle) and what are some examples of its use (good and bad)?
- Could you elaborate Polymorphism vs Overriding vs Overloading?
- What does it mean to “program to an interface”?
- Can you provide a simple explanation of methods vs. functions in OOP context?
- Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
- What is the difference between association, aggregation and composition?
- Can you declare a private class in a namespace?
- : 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?
- How can we call the base method without creating an instance?
- What are sealed modifiers?
- What is the difference between new and override?
- What is early and late Binding?
- What is ‘this’ pointer?
- What is a pure virtual function?
- What are all the operators that cannot be overloaded?
- What is dynamic or run time polymorphism?
- Do we require a parameter for constructors?
- What are a base class, subclass, and superclass?
- What is static and dynamic Binding?
- Ví dụ về thừa kế, đa thừa kê.
- Các câu hỏi về class A và class B.
Tham khảo:
- Top 50 OOPs Interview Questions & Answers
- Commonly Asked OOP Interview Questions | Set 1
- 40 Advanced OOP Interview Questions and Answers
Đây đơn giản chỉ là những chia sẻ cá nhân của mình, nếu bạn có vấn đề gì thì cho mình biết nhé