I have a condition and formula generator in my application. I must save this condition and formula in database and calculate formulas for each condition.
I want to model these conditions and formulas. For example:
Education=BS AND MaritalStatus=Married AND YearsOfService>10
I modeled conditions and formula separately and using Interpreter Pattern.
<a href=http://www.freeimagehosting.net/image.php?87d5753b0f.jpg><img src=http://www.freeimagehosting.net/uploads/th.87d5753b0f.jpg alt="Free Image Hosting by FreeImageHosting.net"></a>
<a href=http://www.freeimagehosting.net/image.php?de66e96277.jpg><img src=http://www.freeimagehosting.net/uploads/th.de66e96277.jpg alt="Free Image Hosting by FreeImageHosting.net"></a>
Now my questions:
1-Are these model Correct?
2-What are context and client in this pattern?
3-In these models , I have to model Coefficients and Items as subclass of Expression, because of Interpreter Pattern, but naturally they aren't. How can I handle this problem?
4-What are equal tables for these models?
November 16, 2008 9:57 AM
November 17, 2008 6:09 PM