G
Guest
Hi,
I have been stuck trying to come up with a design for days. I am working on
a small project regarding barcode and I want to implement a factory design. I
am now confused.
I decided factory pattern since I am dealing with EAN13, UPCA12 UPC8 etc.
Can someone provide a small sample on how to start. I have looked at the
factory implementation online but still can't figure it out. Can someone
provide a sample jsut to start with.
I was trying this:
Public Interface IBarcodeFactory
Function CalculateDigit() As Integer
Property ProductType()
Property ManufactureCode()
Property ProductCode()
Property CountryCode()
Property CheckSumDigit()
End Interface
Public Class BarcodeUPCA12
Implements IBarcodeFactory
End Class
Public Class BarcodeFactory
Public Shared Function GetFactory(ByVal factoryType As
BarcodeFactoryType) As IBarcodeFactory
End Class
Please help. I am really confused here.
I have been stuck trying to come up with a design for days. I am working on
a small project regarding barcode and I want to implement a factory design. I
am now confused.
I decided factory pattern since I am dealing with EAN13, UPCA12 UPC8 etc.
Can someone provide a small sample on how to start. I have looked at the
factory implementation online but still can't figure it out. Can someone
provide a sample jsut to start with.
I was trying this:
Public Interface IBarcodeFactory
Function CalculateDigit() As Integer
Property ProductType()
Property ManufactureCode()
Property ProductCode()
Property CountryCode()
Property CheckSumDigit()
End Interface
Public Class BarcodeUPCA12
Implements IBarcodeFactory
End Class
Public Class BarcodeFactory
Public Shared Function GetFactory(ByVal factoryType As
BarcodeFactoryType) As IBarcodeFactory
End Class
Please help. I am really confused here.