Description:
ATM is one of the main sources of withdrawal and/or deposit of money nowadays. In this project, a simulation of a location with multiple ATM Machines (say ATM booth outside the banks) is attempted. The ATM Machine must be capable of servicing different types of account holders (customers) depending on account type and transaction type. A customer can perform four transactions i.e. Withdrawal,Deposit, Transfer and Balance Inquiry. Also, a customer can have two types of Accounts, namely, Personal and Business accounts with four possible subtypes of each. Thus, a three level inheritance model is used. The important technique is to find similar data members among them and use multiple level inheritance to maximize code reuse as well as to use method overriding to implement polymorphism. Multiple inheritance creates a diamond problem, with which, the UML diagram looks like a diamond and the derived class will inherent indirectly multiple copies from the first base class it's protected data members and public methods making them ambiguous, so, they will not get past the compiler; while using overriding technique in polymorphism to use two accessor methods for the hierarchy creates a problem of accessing many Data Types using only these two methods. This project will show the solution of how to solve diamond problem and overriding accessor methods as well as the important components used.