0

This will sound like a homework assignment, it sort of is, but isn't. Anyway!

I have created a simple address book application with a CSV backend.

This utilises a Person class to store the contacts details and an AddressBook class storing the list of Person.

Within the code we have to demonstrate:
- Polymorphism
- Inheritance
- Encapsulation

I have covered inheritance through the implementation of IEnumerable to allow for-each'ing through a list of People. Encapsulation is covered by using properties to allow access to private fields.

However I somewhere need to fit in an example use of Polymorphism which I'm failing to see how I can do with the current setup, and was looking for opinions as to where I could probably use it.

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Mike Askew
0

After starting a wonderful debate on StackOverflow I have picked on my implementation of IEnumerable and will bend that as polymorphism.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.