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 trial

C#

JingChi Liang
JingChi Liang
1,081 Points

Through this course, could I say other classes like tower, point, maplocation...these need accessor methods?

do I have any misunderstand?

1 Answer

Steven Parker
Steven Parker
231,110 Points

Since you didn't provide a link to the course I'm counting on my memory. But as I recall, the classes in that project have properties, so they don't need accessor methods.

I can be more specific if you show some code and/or link to the course page and ask about something in particular you think an accessor might be needed for.

JingChi Liang
JingChi Liang
1,081 Points

https://teamtreehouse.com/library/accessor-methods

it is all about this treehousedefense game. So could accesssors apply to all these object classes?

Steven Parker
Steven Parker
231,110 Points

In this video, "GetLocation" and "SetLocation" are accessor methods. But the later videos show you how to use properties instead.