src/main/java/com/mycompany/app/dsa/chapterOne/PredatoryCreditCard.java
public void processMonth(){
    if(balance > 0 ){ //oly charge interest on a positive balance
        double monthlyFactor = Math.pow(1+apr, 1.0/12); // compute monthly rate
        balance *= monthlyFactor;

    }
}
// A new method for assessing monthly interest charges
A new method for assessing monthly interest charges
A new method for assessing monthly interest charges
public void processMonth(){
    if(balance > 0 ){ 
        double monthlyFactor = Math.pow(1+apr, 1.0/12); 
        balance *= monthlyFactor;
    }
}
public void processMonth ( ) { if ( balance > 0 ) { double monthlyFactor = Math . pow ( 1 + apr , 1.0 / 12 ) ; balance *= monthlyFactor ; } }
A new method for assessing monthly interest charges
A new method for assessing monthly interest charges
//oly charge interest on a positive balance // compute monthly rate