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!
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
Does the user in a user story get modeled as a class, too?
I noticed (at least up to point 5:48 in the video) that the "KJ" isn't modeled as a class but instead appears to be the one who runs the program. Is there a way to determine if and when a user in a user story has to be modeled as a class?
Emily Cain5,850 Points
Interesting question, I have several thoughts on it.
1) In the most basic sense, no, the "user" does not get modeled as a class. The "user story" is simply a way of thinking about what functions the program should have so you can design your program in a function-driven way.
(There may be circumstances where it makes sense to have a "user" class, for example, in software that involves different people creating accounts and profiles, but even then the software class "User" is distinct from the general concept of a person who uses the software, which is really what we're talking about when we talk about "user stories".)
2) The KJ seems to be a piece of software designed to carry out the tasks performed by the various classes in a logical manner. It doesn't really correspond to the user in the user story in any particular way.
Does that make sense/answer your question?