Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. A class question...

A class question...

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasedesignhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bnathvbdotnet
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • B bnathvbdotnet

      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

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      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

      B 1 Reply Last reply
      0
      • N Nick Seng

        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

        B Offline
        B Offline
        bnathvbdotnet
        wrote on last edited by
        #3

        thank you. I will think about that.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups