Define a class namely RegularAcc for online shopping with attributes name (string), balance (double), and a method as below
• bool pay(double amount): to pay and deduct from the current balance (false if does not have enough money).
Define another class GoldAcc inherits from the class RegularAcc, with an extra attribute namely bonusCoin (double). Override the pay method for GoldAcc so that 5% of paying amount will be rewarded to the bonusCoin.
Example: paying amount = $1000 → reduce $1000 from current balance and add $50 to the bonusCoin
value.
Provide suitable constructors and test pay() methods of both RegularAcc and GoldAcc classes in main().