Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Object-Oriented Swift Class Inheritance Overriding Properties

Seth Roope
Seth Roope
6,471 Points

Sub Class named "Super"?

Am I the only one who finds it annoyingly confusing when we are creating a subclass and calling it SuperEnemy? Then we refer back and forth between the subclass and the superclass, but the subclass has "super" in it's name. Why not not call it "StrongEnemy" or anything that would be less confusing?

Christian Mangeng
Christian Mangeng
15,970 Points

Hi Seth,

I don't see why that's so confusing: SuperEnemy is a certain type of enemy, while Enemy is a very general type. The confusion only comes from the word "superclass". But you could also call the superclass "parent class".

Jeff McDivitt
Jeff McDivitt
23,970 Points

I don't see the confusion but if it confuses you, you could think of the classes as a parent/child relationship. The SuperClass would be the parent and the Subclass would be the child

Seth Roope
Seth Roope
6,471 Points

Yeah, I get it. I just don't understand why they would not try and eliminate all opportunities for confusion, especially when teaching a new language to possibly first time coders.

This course has been criticized on multiple occasions. I too had trouble with it back when I was taking the course. And I totally agree that it should be considered for a remake.

If I recall, base class was also mention when referring to the superclass which makes sense, but at the time learning just added to the confusion in my opinion.

Just don't think too much about it, you'll have loads of practice with classes and subclassing.

Christian Mangeng
Christian Mangeng
15,970 Points

As for the course itself: I do agree that the course and the concept of the tower defence game with the point instances seems disproportionately difficulty (like, in my opinion, the Vending Machine course does, though it does come later) at that early stage of the beginner's course.

Seth Roope
Seth Roope
6,471 Points

Yeah, it all still makes sense, but if Pasan wasn't great at enunciating and emphasizing and in general speaking very clearly I would be very frustrated.

The tower defense game, to me, is a good example because most people who want to develop iOS can relate to it, so it does a great job of illustrating "higher level" concepts like inheritance and classes vs structs.

@Marcus Klausen, yeah I think you are right they do also refer to the super class as the base class, adding slightly more confusion. Although it is good to think of the super class as the base class so I am glad it is thrown out there.

Overall, I think this course does a great job of communicating complicated subject matter in short video segments, I'm just wondering how many people are getting confused at this point and calling it quits.

Christian Mangeng
Christian Mangeng
15,970 Points

Don't get me wrong, Pasan really does a great job explaining all those concepts. It's just that for this course I really had to rewatch some of the videos (and I do not consider myself stupid ;), though I am still quite a newbie to programming). It wasn't necessary for me in any of the iOS courses before or after that one (except later for the Vending Machine one).

Seth Roope
Seth Roope
6,471 Points

Haven't gotten to the vending machine one yet. Can't wait!

I feel you though Christian Mangeng, I think that is why I like programming. I'm a fairly intelligent person and programming can just make me feel stupid sometimes. But, then once I grasp something and go back to it I wonder how I ever was confused in the first place!

Robert Cadorette
Robert Cadorette
9,275 Points

Second time through, it's easy to follow regardless of the poor naming choices. A beginner expected to grasp super.init dealing with a subclass called "Super"something... seriously? Seth, you are on point with your criticism.

Jeff Reynolds
Jeff Reynolds
2,892 Points

I agree, it's a poor naming choice. Came here to say the same thing.

1 Answer

P Ku
P Ku
11,100 Points

Call it BossEnemy to avoid the super/sub debate...