The appropriate class structure to hold this?

I have a KPI which consists of a set of measures which are scored in different ways but each of which use some of the same data to determine a score.
So far I have a VB .net class:

Class KPI
    public property DateStart as datetime
    public property DateEnd as datetime
    public property CVSent as cPerformance
    public property SalesLeadsGenerated as cPerformance
    public property Interviews as cInterest
    public property ClientCalls as cInterest
End Class

cPerformance and CInterest inherit from another class cScore.  Each of these has a score property which includes its own particular way of determining a score but common to both, they need DateStart/DateEnd from the creating class order to calculate the score.
This suggests to me that either these classes need a reference to their creator or the values passing as constructors.
I wanted it so that when we 'Get' the score it calculates and that makes me think its not really a constructor I want to use since the datestart and dateend may be altered after construction which will affect the score.

So there for I am leaning towards passing a reference to the parent class but from what  I understand this is bad practice and there is probably right way to do it...
Can anybody suggest what I should be doing or confirm if this is the right approach?
dgloverukAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
So there for I am leaning towards passing a reference to the parent class but from what  I understand this is bad practice...
As with anything code-related, you have to be mindful of how you do it, but I don't see anything (necessarily) incorrect with doing that. However, if you do add a reference to the calling class, you will be adding a dependency to this class, and you will have to be prudent with changes you make to the class(es).

Is there a compelling reason to not pass these data values via the constructor (or even a method)?
0
dgloverukAuthor Commented:
I read an article which specified something about passing objects by reference created a lot of overhead.
I was thinking about that dependency issue and it made me think that if I wanted to score against perhaps another class it would become a burden.
I have opted in the end to repeat the information in the child class that is necessary for it to work.  In doing this despite the duplication, it does make the class more reusable.

Thanks for your input!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽Commented:
Classes in .NET are always passed by reference. Structs are passed by value. There is (typically) more overhead with a struct because a copy of the struct is created before it is passed.
0
dgloverukAuthor Commented:
As above
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.