src/main/java/com/mycompany/app/dsa/chapterOne/PredatoryCreditCard.java
public boolean charge(double price){
        boolean isSuccess = super.charge(price); //call inherited method
        if(!isSuccess)
        balance += 5; // assess a $5 penalty
        return isSuccess;
    }
//Overriding the charge method defined in the superclass
Overriding the charge method defined in the superclass
Overriding the charge method defined in the superclass
public boolean charge(double price){
        boolean isSuccess = super.charge(price); 
        if(!isSuccess)
        balance += 5; 
        return isSuccess;
    }
public boolean charge ( double price ) { boolean isSuccess = super . charge ( price ) ; if ( ! isSuccess ) balance += 5 ; return isSuccess ; }
Overriding the charge method defined in the superclass
Overriding the charge method defined in the superclass
//call inherited method // assess a $5 penalty