Bank ATM Machine Simulation using Multiple Inheritance and Polymorphism in C++

Loading...
Thumbnail Image

Authors

Alhinnawai, Akram
Wang, Haiyang

Issue Date

2012

Type

Presentation

Language

Keywords

Faculty research day

Research Projects

Organizational Units

Journal Issue

Alternative Title

Abstract

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.

Citation

Poster 43

Publisher

License

Journal

Volume

Issue

PubMed ID

DOI

ISSN

EISSN