// COBOL Programmers Swing With Java - copyright 2005 Doke, Hardgrave, & Johnson // Chapter 9 - Data Access // Program to demonstrate Object Persistence using Serialization // Customer.java 1 JAN 05 public class Customer implements java.io.Serializable { // customer attribute definitions private String name; // private scope limits access to this class private String ssNo; private String address; private String phoneNumber; // constructor method to create an instance public Customer (String newName, String newSSNo, String newAdr, String newPhone) { name = newName; ssNo = newSSNo; address = newAdr; phoneNumber = newPhone; } // changeAddress method public void changeAddress (String newAdr) { address = newAdr; ; } // accessor methods public String getName () {return name;} public String getSSNo () {return ssNo;} public String getAddress () {return address;} public String getPhoneNumber () {return phoneNumber;} } // end of Customer.java