Aureole Posted October 14, 2007 Share Posted October 14, 2007 I need to be able to use my Database class within my Member and Render classes, do I do this via class extending? i.e. class database extends member, render { Or is there some other way to do it? Thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 15, 2007 Share Posted October 15, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.