In set theory, a set is a superset if it contains everything in the original set and possibly more. A subset however is does not contain everything of the initial set.
With that in mind, in most object-oriented programming languages (I'm thinking Objective-C but I know the same is true for Java and others), the parent class is called the super
class, and any class which inherits from the super is called a subclass
.
Isn't this backwards? A subclass inherits things like all instance variables and methods from its superclass, thus it "contains" everything from the parent, plus whatever is added in the subclass. Is this just a naming mistake or was this intentional, and if so why?