03-26-2012 11:58 AM
Hi,
I am just getting into the design of some software that will take either one or two numbers and perform identical operations on them. It will then create a label that will be different depending on whether 1 or 2 serial numbers are used.
In the example it looks like I could make a vehicle class that would contain the serial number, and child classes for car, truck and boat that would define how the sticker was laid out.
The trouble I am having is that the control for serial number 1 and serial number 2 need to accept any of the three numbers for car truck and boat.
So I am not sure how to build classes to cover this, and what design pattern would be best.
So I am looking for ideas.
I have no real code yet to post, and a lot of the attributes are confidential, which is why I made the simple diagram.
03-26-2012 12:12 PM
Search this site for...
Factory Pattern
It basiclly uses a case sctructure to to select a Class constant of the proper type.
Have fun!
Ben