I was recently given the following task, and failed, the reason given that I misunderstood the question
Create a 'LibraryItem' interface. Create 3 concrete implementations of LibraryItem: 'Book', 'CD', 'DVD'. Apply the visitor pattern to your data model. Write a MaximumBorrowTimeVisitor that computes the maximum time you can borrow a LibraryItem. Create an arbitrary instance of a data model and apply the MaximumBorrowTimeVisitor.
I thought this was simple, and yet I failed the task.
How would you solve this task?