package eco.game;


public class Loan {
    public int maxLoans = 5;
    public float[] coupons = new float[maxLoans];
    public int[] principals = new int[maxLoans];
    public int[] maturityDates = new int[maxLoans];

    
    public Loan(){
        
        
    }
    
    public void takeLoan(){
        
        
        
        
    }
    
    public void payInterest(){
        for(int i = 0; i < maxLoans; i++){
            if(coupons[i] != 0){
                
            }
        }
        
    }
    
    public float calculateInterest(){
        return 4.4f;
        
        
    }
    
    
}

@@ -362,34 +362,95 @@
 oid payInterest(
-)%7B
+Country borrower, Country lender)%7B%0A        int interestPayment;
 %0A        for(int
@@ -529,70 +529,461 @@
     
- %0A            %7D%0A        %7D%0A        %0A    %7D%0A    %0A    public float
+interestPayment = (int)(principals%5Bi%5D * coupons%5Bi%5D);%0A                if(borrower.economy.getTreasury() - interestPayment %3C= 0)%7B%0A                    bankruptcy(borrower);%0A                %7D%0A                %0A            %7D%0A        %7D%0A        %0A    %7D%0A    %0A    public void payInterest(PlayerCountry borrower, Country lender)%7B%0A        %0A    %7D%0A    %0A    public void payInterest(Country borrower, PlayerCountry lender)%7B%0A        %0A        %0A    %7D%0A    %0A    public double
  cal
@@ -1018,17 +1018,16 @@
 turn 4.4
-f
 ;%0A      
@@ -1045,19 +1045,159 @@
 %0A    %7D%0A    %0A
+    public void bankruptcy(Country insolvent)%7B%0A        %0A    %7D%0A    %0A    public void bankruptcy(PlayerCountry insolvent)%7B%0A        %0A    %7D%0A    %0A
     %0A%7D%0A

Update Loan.java