练习2 练习目标-使用引用类型的成员变量:在本练习中,将扩展银行项目,添加一个(客户类)Customer类。Customer类将包含一个Account对象。

package banking;

public class Customer {

    private String firstName;
private String lastName;
private Account account; public Customer(String firstName,String lastName)
{
this.firstName=firstName;
this.lastName=lastName;
}
public String getFirstName()
{
return firstName;
}
public String getLastName()
{
return lastName;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
} }
上一篇:WCF简单使用(分别部署在控制台和IIS上)


下一篇:Linux常用命令_(网络管理)