Hi all,
I have 2 classes. One writes images to a file and another writes them to a db. This absolutely looks like the Strategy Pattern but I am unsure of how to implement it. The FileImageWriter will take a path of where to store it and the DbImageWriter will have to take the host, service_name, username and password. I am sure that both of them should take some kinf of interface like IImageWriter but I don't know exactly how to get this done.
Thanks in advance
Brian
Spend like you don't need the money,
love like you've never been hurt and dance like no one's watching!
I have 2 classes. One writes images to a file and another writes them to a db. This absolutely looks like the Strategy Pattern but I am unsure of how to implement it. The FileImageWriter will take a path of where to store it and the DbImageWriter will have to take the host, service_name, username and password. I am sure that both of them should take some kinf of interface like IImageWriter but I don't know exactly how to get this done.
Thanks in advance
Brian
Spend like you don't need the money,
love like you've never been hurt and dance like no one's watching!