Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.
Explore My Other Channel for More Cool and Valuable Insights
👉 Youtube Learn Tech Tips👉 Tiktok
👉 Facebook:What's different about Abstract class and Interface?
- Abstract class: is a parent class for all the classes of the same nature. (relative Is-a). We can use extends keyword in C#, php, java code
- Interface: is a function that you can add and any class. (relative can do). We can use implements keyword in C#, php, java code.
- Cùng một loại, nhóm chúng ta có thể gom thành một abstract class (Quan hệ Is - a)
- Cùng một chức năng, chúng ta có thể gom thành một interface (Quan hệ can do)
Xem hình bên dưới,
- Ta có các subclass thuộc abstract class Animals and Machines
- Ta có các Interface:Swimable, Runnable và Flyable (như ta thấy hai subclass Bolt và MCQueen là hai abstract class khác nhau, nhưng vẫn có chung interface)
How to used Abstract class and Interface:
Are you interested in topic OOP - Object-oriented programming, abstract class vs Interface from Webzone Tech Tips? If you have any thoughts or questions, please share them in the comment section below. I would love to hear from you and chat about it
Webzone Tech Tips - Zidane