I'm working on a program that has a Person class and a Business class. My program should track people and businesses that donate to a cause. So a donor can be either a Person or a Business but not all Persons and Businesses are donors. I still want to have objects for the people and businesses that do not donate so I don't ask them again.
Should I have a class, Donor, that is extended by Person and Business? I don't want to do a PersonDonor class and a BusinessDonor class as that extend Person and Business respectively since much of the code would be redundant.
Should I have a class, Donor, that is extended by Person and Business? I don't want to do a PersonDonor class and a BusinessDonor class as that extend Person and Business respectively since much of the code would be redundant.