// COBOL Programmers Swing With Java - copyright 2005 Doke, Hardgrave, & Johnson // Chapter 3 - Java Structure // Program to model the Customer class // Customer.java 1 JAN 05 public class Customer { // 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; } // end constructor // setAddress mutator method public void setAddress (String newAdr) { address = newAdr; } // end setAddress // accessor methods public String getName () {return name;} public String getSSNo () {return ssNo;} public String getAddress () {return address;} public String getPhoneNumber () {return phoneNumber;} } // end Customer.java