https://github.com/yuhexiong/object-oriented-programming-java
https://github.com/yuhexiong/object-oriented-programming-java
java object-oriented-programming oop
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuhexiong/object-oriented-programming-java
- Owner: yuhexiong
- Created: 2023-10-14T10:36:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-14T13:04:16.000Z (over 2 years ago)
- Last Synced: 2025-01-30T01:14:47.803Z (over 1 year ago)
- Topics: java, object-oriented-programming, oop
- Language: Java
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Object Oriented Programming
Examples for four basic principles of object oriented programming
### 1. Abstraction (抽象)
父類別定義abstract方法,於子類別Override進行實作。
### 2. Encapsulation (封裝)
宣告為private的屬性或方法無法直接公開取用,必要時另外寫public method另外提供使用。
### 3. Polymorphism (封裝)
同樣的方法,在不同子類別中可以進行Override,達到不同的結果。
### 4. Inheritance (繼承)
子類別可以使用父類別的public屬性與方法。