Inherritance Advice

vckngs7 (79)
Hello,

I am having trouble putting together a program design which fulfills certain needs for me. My situation is as follows.

I use data files to build objects for used in data analysis. Many of these files are related to one another but not all of my analysis requires the use of every data file. The most basic structure I have is a protein which takes a specific data file to fill in its properties. Some of my analysis requires the use of interface data whereas others require the use of area data. This data comes to me in two respective files. What i want to be able to do is to create a base class Protein and two further classes (inherited from protein? Perhaps not? This is where my question really lies) which can be included into a project based on whether the appropriate data file (interface or area) is available for any given project. And for projects which use both interface AND area data I want to be able to create objects that incorporate all of this information and can cross access it so as to perform further data analysis.

I have studied some polymorphism and inheritance but I do not yet feel as though I have a solid solution. Ideally I would have a system whereby I could include certain header files which would expand my protein class as appropriate to include methods and properties required for the interface or area data AND be such that if I include BOTH interface AND area data I have access to all of the methods and functions.
Registered users can post here. Sign in or register to post.