My assignment requires me to demonstrate composition in my source code. I completed my code and worked out all the bugs but at the end where I display the date, I doubt that constitutes composition.
Here the question:
Create a system that maintains information on drivers' licenses. The system must maintain an ID Number, Address, Issue Date, Expiry Date & Owner Name for each license owner.
- In your system design should demonstrate the following concepts:
- Composition Relationship ("has-a" relationship) Licenses + date
- Default and Copy Constructors for both classes
- Destructor for both classes
- In main test the class by creating objects and making function calls
I'm thinking I should call the display date function in licenses display function but when I do that all I get back is the initialized dates I set in my primary constructor for Licenses.