2021-02-10 09:40:19 -05:00

28 lines
555 B
Java

public class HomeBuyer{
//.getFirst .getLast .getCreditScore
//constructed as (first, last, score)
private String fName, lName;
private int creditScore;
public HomeBuyer(String fName, String lName, int creditScore){
this.fName = fName;
this.lName = lName;
this.creditScore = creditScore;
}
public String getFirst(){
return fName;
}
public String getLast(){
return lName;
}
public int getCreditScore(){
return creditScore;
}
public String toString(){
return fName + " " + lName + " (Credit Score: " + creditScore + ")";
}
}