Superclass Inherits From A Subclass. Coursera. Are They Crazy?
Learn to Program: Crafting Quality Code Screenshot This is a video lecture from Coursera Learn to Program Crafting Quality Code Course. So there is a quiz during the video. class
Solution 1:
There must be something wrong with the quiz, the code as written in the question is declaring that MyInt is a subclass of int (or equivalently: that int is the superclass of MyInt), no the other way around.
Solution 2:
If you inherit from a class, that class is the super-class. In the example int is the super (or base) class and MyInt is the subclass. They're wrong, just as you suspected. ;-)
Post a Comment for "Superclass Inherits From A Subclass. Coursera. Are They Crazy?"