In this example, we've changed the Student and Teacher classes to hold vectors of pointers to Course objects rather than directly creating Course objects within them. This way, the Course objects are owned by the main() function and not by the Student and Teacher objects. This is the essence of aggregation: the Student and Teacher objects aggregate Course objects that are owned by someone else.
-
Notifications
You must be signed in to change notification settings - Fork 0
COS2614/ch02-aggregation-relationship
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Demonstrates an aggregation relationship between three classes
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published