A class question...
-
I have come across a design issue (programming in vb.net) . It would be helpful if any one share their opinion about this . I am trying to design a class and I wanted to make sure I am in the right path... A 'Rate' is an interest rate at a specific maturity (Term on X-axis and Rate on Y-axis) example...5.2% for 15 year loan. A rate can be a simple rate as simple as 5.6% for 3 years term or it could be a complex rate where it is combination of two or more simple rates. For complex rate or simple rate the attributes, methods or exactly same. No difference absolutely except that for a complex rate we need to add 1 or more simple rates. I think I am thinking along the lines of creating a generic class (non-abstract) called as 'RATE' class and create an "RateComposer" class (which will know by accessing database wheather it is a simple rate or a complex rate) which will create multiple instances of 'Rate' class and gets the rate for each simple rate and sums it to get the final complex rate. Pls comment.. thank you
-
I have come across a design issue (programming in vb.net) . It would be helpful if any one share their opinion about this . I am trying to design a class and I wanted to make sure I am in the right path... A 'Rate' is an interest rate at a specific maturity (Term on X-axis and Rate on Y-axis) example...5.2% for 15 year loan. A rate can be a simple rate as simple as 5.6% for 3 years term or it could be a complex rate where it is combination of two or more simple rates. For complex rate or simple rate the attributes, methods or exactly same. No difference absolutely except that for a complex rate we need to add 1 or more simple rates. I think I am thinking along the lines of creating a generic class (non-abstract) called as 'RATE' class and create an "RateComposer" class (which will know by accessing database wheather it is a simple rate or a complex rate) which will create multiple instances of 'Rate' class and gets the rate for each simple rate and sums it to get the final complex rate. Pls comment.. thank you
You might want to think about implementing an
ICollection
interface with your "RateComposer" class. It will make subsequent operations on the class much easier.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler. Support Bone
-
You might want to think about implementing an
ICollection
interface with your "RateComposer" class. It will make subsequent operations on the class much easier.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler. Support Bone
thank you. I will think about that.