- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 185字
- 2021-06-25 20:52:27
Objects and classes
Objects are the main elements of an object-oriented programming (OOP) language. An object holds both the state and the behavior.
If we think of classes as a template, objects are the implementation of the template. For example, if human is a class that defines the behavior and properties that a human being can have, you and I are objects of this human class, as we have fulfilled all the requirements of being a human. Or, if we think of car as a class, a particular Honda Civic car will be an object of this class. It will fulfill all the properties and behaviors that a car has, such as it has an engine, a steering wheel, headlights, and so on, and it has behaviors of moving forward, moving backward, and so on. We can see how the object-oriented paradigm can relate to the real world. Almost everything in the real world can be thought of in terms of classes and objects, hence it makes OOP effortless and popular.
Object-oriented programming is based on four fundamental principles:
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism (subtyping polymorphism).
- C語言程序設計基礎與實驗指導
- FFmpeg入門詳解:音視頻流媒體播放器原理及應用
- 人臉識別原理及算法:動態人臉識別系統研究
- Web全棧工程師的自我修養
- Oracle BAM 11gR1 Handbook
- Orchestrating Docker
- Hands-On Robotics Programming with C++
- Getting Started with Electronic Projects
- SQL Server實例教程(2008版)
- HTML5程序開發范例寶典
- 高性能MVVM框架的設計與實現:San
- Mastering Machine Learning with scikit-learn
- Node.js Web Development
- HTML5 and CSS3:Building Responsive Websites
- 面向物聯網的Android應用開發與實踐