Okay so I'm having some difficulty with my assignment, I'm making a contact manager, and within this you have two different types of contacts, you have Business Contacts and Personal Contacts, which both extend the Contacts class.
Now business contacts have meetings, and Personal contacts have special events. Now the problem I'm having is with a method, called getEventsMethod(). Events class is an interface, although my teacher wants us to determine whether its a business contact or personal contact, and store the result of the meeting or specialevent in an array of Events. This is what I'm having trouble with I'm not sure how to go about how to write the method in my businessContact/PersonalContact to store their unique event within the interface of events. Does anyone have any suggestions.. I'm really stuck.
1 Replies - 74 Views - Last Post: 14 October 2013 - 04:27 PM
Replies To: Help with Storing Different Objects in an Array of Interfaces
Re: Help with Storing Different Objects in an Array of Interfaces
Posted 14 October 2013 - 04:27 PM
Now business contacts have meetings, and Personal contacts have special events.
No. A Meeting has two or more Contact instances associated with it. OK, it's theoretically possible that it's not 2..n but 0..n (no-one shows up). A similar sort of thing would go on with Event (which is actually a supertype of Meeting actually)
Page 1 of 1