473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Association/Aggregation/Composition

I think i have a good handle on aggregation/composition. can someone
tell me if i am headed in the right direction with my analysis below:

We have the following objects:

Employee
EmployeeCollection
Hour
HourCollection
Infraction
InfractionCollection
The hour class/infraction class cannot exist without an employee. the
collection classes hold multiple hours and infractions for each
employee. therefore i have created the following compositions:

Compositions:
Employee <#>------ HourCollection
Employee <#>------ InfractionCollection

Binary associations:
Employee ---- EmployeeCollection
Hour ---- HourCollection
Infraction ---- InfractionCollection

From what i understand I would use aggregations if a class does not
belong to another class and can belong to many classes. I don't think
i have this scenario in any of my classes above.

Am i on the right track here?
Jul 21 '05 #1
0 1889

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris K | last post by:
I am relatively new to C++ and hope that this question is relevant. I have spent some time at the local library and some time on dejanews, but have no decided to go ahead with my question, since...
4
by: cmrchs | last post by:
Hi, how do I implement aggregation and how composition in C# ? When I say : an Airplane has a Pilot then I use aggregation but when I say : an Airplane has a Cockpit then I use composition. How...
4
by: Frederik Vanderhaegen | last post by:
Hi, Can anyone explain me the difference between aggregation and composition? I know that they both are "whole-part" relationships and that composition parts are destroyed when the composition...
11
by: aaj | last post by:
Hi is it possible in VB.NET to aggregate two classes, if so could you tell me how its done? I have been looking for a while and can't find any examples that actually show the physical code....
0
by: DKode | last post by:
I think i have a good handle on aggregation/composition. can someone tell me if i am headed in the right direction with my analysis below: We have the following objects: Employee...
23
by: SenthilVel | last post by:
Hi Can any one let me know the websites/Pdf for learning Aggragation in C#?? Thanks Senthil
7
by: Bruce One | last post by:
In C#, how would people implement a relationship between Customer class and Request class, considering a customer may have 0-n requests and a request must belong to 1 and only 1 customer...? ...
2
by: Gary Wessle | last post by:
Hi what is the difference "in code writing" between aggregation and composition? is the following correct? aggregation (life time of both objects are independent). class A{ /* ... */ };...
4
by: Salman | last post by:
The most confusing concept i have seen in OOP is the difference between Association, Composition and Aggregation. Anyone please tell me whats the actual difference between these three using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.