class HouseHold extends Customer {
public void requestCoupon() {
Transaction();
CouponCount = 20;
}
public double Transaction () {
Payment += CouponPayment;
return Payment;
}
}
class GCustomer extends HouseHold {
public double Transaction () {
Payment += DisCPayment;
return Payment;
}
}
I'm making an object (A) of the GCustomer
class and I need to request coupon using the super class (A.requestCoupon();
). What I'm stuck at is that the method requestCoupon()
calls the Transaction()
method and if A
calls the request method will it call the one in super class or in base class?