This post is written for my classmates at DigiPen.
Most of the class have started learning object-oriented programming really for only two weeks, and the professor uses quite a few synonyms that sound really different but are actually the same things. I thought it is very confusing to many new-comers to OOP, so I felt like writing a post to clarify things up. I’ll just group synonyms of the exact same meaning together:
When class B inherits from class A, we can also say:
Class B is derived from class A.
Class B extends class A.
If class B inherits from class A, we say:
Class B is the subclass, and class A is the superclass.
Class B is the child class, and class A is the parent class.
Class B is the derived class, and class A is the base class.
When we declare a variable C in class A, we say:
C is a data member of A.
C is a field of A.
C is a property of A.
(As Ryan pointed out in the comment, properties in many object-oriented languages may involve implicit getters and setters)
When we declare a function D in class A, we say:
D is a member function of A.
D is a method of A.
This is pretty much what we need to know right now. I hope this post clarifies things up a little bit.