Talk:Object composition
From Wikipedia, the free encyclopedia
Contents |
[edit] Code associated with UML diagram
Below the UML diagram, there is a piece of code showing composition: a car is composed of one carburetor. The car class however, contains a pointer to a carburetor. This is in contrast with the code examples in the point above, where is stated that composition uses an 'object within object' structure, whereas aggregation uses a reference/pointer to the object. In my opinion, if I have understood correctly, the car/carburetor example should be without pointer. it also shows what the sun is. --Patrickdepinguin 19:05, 18 June 2006 (UTC)
[edit] Multiplicity
The UML samples should be given multiplicity. On the owning (diamond) end of the association, for aggregation, the multiplicity, can be any multiplicity (except for 0..0), including 1, 0..1, 0..*, and *. For composition, the owning end can only be 1 or 0..1 --Mjchonoles 13:53, 18 May 2006 (UTC)
- Done. Rjgodoy 18:02, 3 April 2007 (UTC)
[edit] Splitsing of aggregation
I think aggregation should get its own article and that composition should only mention the differences briefly...
[edit] Record (database)
The subject "Record (database)" redirects here, but this page is rather complicated. I recommend an article under "Record (database)", with a link to this page, rather than a redirect. D021317c 05:56, 21 March 2007 (UTC)
- Already redirected to Row. --Kubanczyk 19:08, 18 October 2007 (UTC)
[edit] UML Notation merged with text after introduction
The final paragraph of introduction had been copied as "UML Notation" (near the end of the article). "Aggregation" section also has an UML diagram, so "UML Notation" must be introduced before. Rjgodoy 01:37, 17 April 2007 (UTC)
[edit] No assembler in timeline
Assembler is definately the source of whole idea of "record". Could someone add assembler code as the first item in the timeline? Unfortunately I don't know any pre-COBOL assembler, such as S/360, but it would be perfectly logical here (I guess even zSeries would be better than nothing). --Kubanczyk 19:16, 18 October 2007 (UTC)
IMHO, records in assembler are just a region of memory plus an implicit convention of using such region for storing certain kind of data (nibbles, BCD, bit-flags, etc). I mean there is no assembler notation for declaring "records" besides the directives for reserving memory. Rjgodoy 15:28, 19 October 2007 (UTC)
- Well, even if there would be no dedicated assembler notation (and I assure you that in many assemblers there is one), this programming concept (a record) originated around 1950s from the fact that assembly programmers liked to keep related variables close to each other in the memory, not scattered all over the address space. It may seem trivial now, but it's much more important observation than a syntax of some dinosaur languages (with all the respect to the reptiles). --Kubanczyk 17:04, 19 October 2007 (UTC)
[edit] Aggregation in COM
This section may benefit from improvement, or possibly an image (see User talk:Rjgodoy/1). Shinobu (talk) 16:10, 7 January 2008 (UTC)
[edit] AggregationAndComposition.svg
Image talk:AggregationAndComposition.svg A user has requested that "Ducks" in AggregationAndComposition.svg be spelled "Duck" (singular). I think it makes sense, but I have no tools for editing svg. Rjgodoy (talk) 16:57, 20 February 2008 (UTC)

