Are both variables and methods inherited?

A good answer might be:

Yes---the method show in the superclass VideoTape is inherited in the subclass Movie.

Using a Super Class' Constructor

The class definition for VideoTape has a constructor that initializes the member data of VideoTape objects. The class Movie has a constructor that initializes the data of Movie objects. The constructor for class Movie looks like this:

  // constructor
  public Movie( String ttl, int lngth, String dir, String rtng )
  {
    super( ttl, lngth );                 // use the super class' constuctor
    director = dir;  rating = rtng;      // initialize what's new to Movie
  }

The statement super( ttl, lngth ) invokes the super class' constructor to initialize some of the data. Then the next two statements (on one line) initialize the members that only Movie has. When super is used in this way, it must be the first statement in the subclass' constructor.

QUESTION 9:

Why is it called super?

Click Here after you have answered the question