Skip to content

Demonstrates an aggregation relationship between three classes

Notifications You must be signed in to change notification settings

COS2614/ch02-aggregation-relationship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ch02-aggregation-relationship

Demonstrates an aggregation relationship between three classes

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.

About

Demonstrates an aggregation relationship between three classes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published