I need to implement below algorithm in c#.Which will generate first 13 characters of licence number , Where I will be receiving the customer information in customer object, with all necessary properties.
Can you please suggest which design pattern suits and how we can implement? Is strategy pattern suitable??
Algorithm : Each licence holder in England, Scotland and Wales has a unique driver number, which is 16 characters long. We can't predict all 16 characters, but first 13 we can predict. The characters are constructed in the following way:
1–5: The first five characters of the surname (padded with 9s if less than 5 characters) 6: The decade digit from the year of birth (e.g. for 1987 it would be 8) 7–8: The month of birth (7th character incremented by 5 if driver is female i.e. 51–62 instead of 01–12) 9–10: The date within the month of birth 11: The year digit from the year of birth (e.g. for 1987 it would be 7) 12–13: The first two initials of the first names, padded with a 9 if no middle name