public class PostalZipCode
{
private String barCode;
public PostalZipCode(String zipCode)
{
determinateBarCode(zipCode);
}
private void determinateBarCode(String zipCode)
{
//do what ever calculation you need to generate barCode
setBarCode(GENERATED_STRING_FOR_BARCODE_HERE);
}
private void setBarCode(String str)
{
barCode = str;
}
public void getBarCode()
{
return barCode;
}
}
PS: Please use code tags in the future to post any size of code [code]YOUR CODE HERE[/code]