There are a lot of different ways of looking at this. If I were in an interview, I'd go with this.
Photoshoot shoot = new Photoshoot(
new Camera("Fuji"),
new Subject("Bill"),
new Subject("Dave"),
new Subject("Claire")
);
IEnumerable<Photo> photos = shoot.TakeAllPhotos();
Where
class Photoshoot
{
private readonly IEnumerable<Subject> _subjects;
private readonly Camera _camera;
public Photoshoot(Camera camera, params Subject[] subjects)
{
_subjects = subjects;
_camera = camera;
}
public IEnumerable<Photo> TakeAllPhotos()
{
List<Photo> photos = new List<Photo>();
foreach(Subject subject in _subjects)
{
// Here is the interaction in question
Call(subject);
_camera.TakePhotoOf(subject);
}
return photos;
}
}
So the interaction is this:
The TakeAllPhotos method of the Photoshoot class cycles through the Subjects of the photoshoot, Calls a subject then uses its Camera to TakePhotoOf that subject.
On a different day, I might pass camera to the TakeAllPhotos method, but today I'm arguing that the camera belongs to the photoshoot.
Note also that I passed subject to the (as yet undefined) Call method of the Photoshoot rather than calling a Call method on the subject. The subject shouldn't know how to call itself, in my opinion.
These are the kinds of conversations an interviewer wants you to have. The specific interaction is not going to be that important.