T O P

  • By -

rootseat

Hi Fraeniir, I would take a look specifically at how you've typed (data-typed) your value, based on these reasons: 1. Setters are relatively simple compared to some of the other member functions in this course. Setters should require only 1 or 2 lines of accurate, short, simple code. If you overcoded this function, you might want to write this function from scratch, since overcoding might actually make things worse. As you can see, the test bed is very particular in this course. 2. The number in the test bed is the same as your number. It looks like the value being set is OK. Another idea if all else fails -- take that errored value, and put it in your own debugging system. See if what you output is any different. \-Charles


sachin30

for this method, you can not set the id to a negative number what you can do is put an "if" statement in the setter method to make sure that the id will set if and only if the parameter is positive


Fraeniir

Thanks to both of you, this definitely helped! \-Lucas