package COM.xinit.demon.co.uk.3tier.database;
import java.util.*;
// CustomerRec class
// This class represents a single customer record in the
// database, including the number of shares the customer
// owns.
//
public class CustomerRec {
String ssn;
String name;
String addr;
Vector portfolio;
public CustomerRec()
{
super();
}
public CustomerRec (String ssn, String name, String address) {
this.ssn = ssn;
this.name = name;
this.addr = address;
this.portfolio = null;
}
// Get and return the portfolio for this customer
// This method will return the Vector object that contains
// the portfolio
public Vector getPortfolio () {
return portfolio;
}
public String getName() {
return new String (name);
}
public String getSSN() {
return new String (ssn);
}
public String getAddress() {
return new String (addr);
}
public void print()
{
System.out.println("ssn [" + ssn + "]");
System.out.println("name [" + name + "]");
System.out.println("addr [" + addr + "]");
}
}
Last Updated