Jump to content

Class extending


Recommended Posts

Class extending means that one of your classes is based off another class. If you're creating a class for circles, the circle class might extend a broader class called shape or something. The parent class would provide methods and properties that apply to all of the child classes, and the child classes would implement specific properties and methods that only apply to it. You might have a parent class called vehicle, and the classes that extend it could be car, truck, hovercraft, etc.You don't have to do anything special to use one class in another class, just make sure that the first class is defined before you define the second class.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...