Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHayden Evans
15,399 PointsRefactoring into a Model - Extra Credit
I'm attempting to complete each of the extra credit assignments at the end of each lesson but I am having a little trouble understanding what is being asked in the extra credit assignment for "Refactoring into a Model" badge. Here is the question:
"Modify the CrystalBall class to work without the @property predictions."
If anyone can provide a little more clarification on this question that would be awesome!
Thanks!
1 Answer
Amit Bijlani
Treehouse Guest TeacherThe @property
declaration is a convenient way to create an instance variable and provide getter / setter methods to it. The question is asking if you can do it the old-fashioned way without the @property
declaration.
The answer is here at 1:27. All you need to do is remove the the @property
declaration, create an instance variable and add getter/setter methods.
Hayden Evans
15,399 PointsHayden Evans
15,399 PointsAh that makes sense. Thanks Amit! Really enjoying your courses!!!