58,454
社区成员
发帖
与我相关
我的任务
分享
public double calculateMPayment() {
double j=0.0;
if(jobStatus.equalsIgnoreCase("G")) {
j=0.025/12;
}
else if(jobStatus.equalsIgnoreCase("P")) {
j=0.0425/12;
}
return loanMount*j/(1-Math.pow(1+j, -durationYear*12));
}
public String toString() {
return "Name: "+name+"\nNRIC NUMBER: "+icNum+"\nLoan Amount: "+loanMount+"\nDuration: "+
durationYear+"\nJob Status: "+jobStatus+"\nMonthly Payment: "+calculateMPayment();
}