Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Composition vs. Aggregation
public class Account {
private Profile _profileInfo;
private Login _loginInfo;
public Account(Profile profileInfo, Login loginInfo){
_profile = profileInfo;
_loginInfo = loginInfo;
}
}
public class Account {
private Profile _profileInfo;
private Login _loginInfo;
public Account(){
_profile = new Profile();
_loginInfo = new Login();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.