I think this question related not only to agile but to teamwork in general.
When we are working in a team and each member is working a user story to complete how to avoid creation of duplicate classes and conflict?
I mean if my user story require the creation of class A and also my team member need the same class and created the same (he may create it with slightly different name), how would we plan so that we move smoothly?