Project 2
Explanation of how this program satisfies OOPs concepts:
-
Encapsulation: Each class (Customer, Account, RBI, SBI, ICICI) encapsulates data and functionality related to a specific entity or behavior. For example, Customer class encapsulates customer details, Account class encapsulates account details, and RBI, SBI, ICICI classes encapsulate bank-specific functionality.
-
Inheritance: SBI and ICICI classes inherit from RBI class, thereby inheriting common functionality defined in RBI. This allows for code reuse and promotes modularity.
-
Polymorphism: SBI and ICICI classes override methods getInterestRate() and getWithdrawalLimit() from the base class RBI. This allows for polymorphic behavior where the same method call (getInterestRate() or getWithdrawalLimit()) behaves differently depending on the actual object type (either SBI or ICICI).