1. Object-Oriented Programming (OOP)
When I wrote Object-Oriented Programming code, only God and I understood what I did. Now only God knows.
2. Class
What do teachers and Object Oriented Programming have in common?
They all have classes.
3. Object
Judge: You seem to be in some distress. Is anything the matter? Witness: Well, your honor, I swore to tell the truth, the whole truth and nothing but the truth, but every time I try, some lawyer objects.
4. Encapsulation
Project Manager: Cindy, please write a function to return woman age. Cindy: Piece of cake.
public class Woman {
private int age = 50; // attribute not visible outside of an object
public int getAge() {
// control access to the object's attribute
return 30;
}
}
5. Inheritance
What’s the best way to become wealthy?
Inheritance.
7. Polymorphism
Boys use the word friendship to start relationships.
Girls use the same word friendship to end relationships.
Same word with different behaviors is polymorphism.
8. Abstraction
I always wanted to be an abstract painter.
I won’t go into detail.
Learning Object-Oriented Programming (OOP) concepts can be a lot of fun.
No comments:
Post a Comment