This question is basically just a simple application of the adapter design pattern.