Java Cart .

Java Cart Zip java

package cart;

//Zip - has methods to store and verify zip codes
//author - Lawrence Truett -
//date - August 12, 2003 - San Diego, CA
public class Zip {
    private String rawZip = null;
    private int zip5;
    private int zipPlus;
    private boolean isNumeric;
    public Zip() {}
    public Zip(String zipIn) {
    //could probably have all sorts of cleaver verification stuff here
    //could also populate appropriate zip5, zipPlus4, etc
    //note USA zips are numeric, others are not
    public String getZip() {return rawZip;}
    private void setZip(String zipIn) {this.rawZip = zipIn;}
    public String toString() {return ("zip: " + this.getZip());}
To download source right-click here and "Save As...".
Sign in to be the first to comment on Java Cart Zip java.