That implies that you do not need a yIntercept member variable unless you intend to perform caching of the value, but that does not seem to be the case here.It does. It is supposed to compute the value and return it.
I suggest that you revert to the header file that your instructor provided.With the way it was set up the instructor was initializing those variables locally (yIntercept and slope) so I only put them in the .h file after it was giving me an error message (the one I had earlier).
What do you mean by "got rid of the initialization in the local part of the program"? There is no such thing as "the local part of the program", since locality depends on your point of reference.Either way I got rid of the initialization in the local part of the program and it didn't change anything.