A sample of template class code realization

Could someone provide a source code in Java for the class diagram attached below? This class diagram was borrowed from the book "UML Distilled" by Martin Fauler, p. 82. The book itself does not provide any source code for an entire diagram, only for a template class.

Unfortunately you are unlikely to find anyone here who will just hand over the code for you (NotACodeMill <-- click). However, if you make an attempt at implementing this pattern yourself and come back with any specific problems you encounter then I'm sure you will be very successful with finding some help.

Tim Driven Development

Sergei Zhylinski
Ranch Hand

Joined: Nov 15, 2013
Posts: 81

1

posted Jan 16, 2014 01:57:57

0

OK. I do have some assumptions. In our case, "EmployeeSet" is not marked as a template subclass, therefore "Employee" is a type but not a type parameter. The code is as follows: