I am using a class through a dll to which I do not have direct control. So in effect, I am only a client of this class.
The class represents a form that can be printed, sent to clients and tracked in the system. I need to calculate two types of dates after which, if the form is received it is considered late.
Rather than simply calculate the late dates in the method where I am already handling the form, I want to extract the algorithm for calculating the late dates in a separate class as it is complicated and can be subject to change for administrative reasons.
Since I cannot modify the original class. I came up with these possible solutions:
(For reference the code is in C# 4/.Net 4.)
A- Create a FormLateDateCalculator class that has methods to return a late date for a given form.
B- Create a FormLateDate class that takes a form in it's constructor and has a property for each type of late date.
C- Create two extension methods on the Form class that calculate the late dates.
While all three of these methods work (and I am sure there are others), I would like to know which is the best in regards to object-oriented design and why?