How do I use the super function?

Repost - replying to the thread rather than a previous reply.

Just a very quick question on the super function. When we call it, we should call it ONCE at the beginning of the body of constructor() and pass in the arguments that are needed in the constructor() of the superclass (parent class) right?

For example, instead of just super(name) like in the exercises, we should call super(name, age, gender) if those were parameters in the parent class?


Yes. Typically you would pass an argument for each property in the constructor of the parent class that requires a parameter. Some properties may be assigned arbitrarily by the constructor as we saw with the number of vacation days in the exercise.