OOP Question

LoneRegister

New member
Joined
Dec 12, 2010
Messages
1
Programming Experience
10+
I am working on creating a class that will write out various objects to the database.

I could write this class such that one class contains all the variations for the different objects that I wish to write to database. However, this becomes cumbersome after a while.

Ideally- what I would like to do is create an abstract base class, and then many child classes that inherit the base class.

Key things i need - there are several values that have to remain constant throughout a process handling many objects. The parent class should "store" that information.

I want to call the class such that it's pretty clean - in that when I call the "write" function - the class understands what type of object is being passed to it - and then handles writing it.

When I have a new object that I need to add, I will extend the class with the new functionality.

As stated above - I'd rather not have to keep added more and more code to one "class file" - but rather add many small "class files"

Thank you for suggestions about how to go about this.

Kevin
 
The inheritance elements in VB language covers all your needs. I recommend first going through this to learn about inheritance: Inheritance in Visual Basic
 
Back
Top