28 lines
555 B
Java
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 + ")";
|
|
}
|
|
|
|
}
|