11.8. (Optional) Software Engineering Case Study: Incorporating Inheritance and Polymorphism into the ATM System
We now revisit our ATM system design to see how it might benefit from inheritance and polymorphism. To apply inheritance, we look for commonality among classes in the system. We create an inheritance hierarchy to model similar classes in an efficient and elegant manner that enables us to process objects of these classes polymorphically. We then modify our class diagram to incorporate the new inheritance relationships. Finally, we demonstrate how to translate the inheritance aspects of our updated design into Visual Basic code.
In Section 4.9, we encountered the problem of representing a financial transaction in the system. Rather than ...
Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.