Click here to Skip to main content
15,898,134 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: OO design: Copying data from class A to B Pin
Keld Ølykke26-Feb-11 14:12
Keld Ølykke26-Feb-11 14:12 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor27-Feb-11 22:39
Nilzor27-Feb-11 22:39 
GeneralRe: OO design: Copying data from class A to B Pin
Keld Ølykke28-Feb-11 10:24
Keld Ølykke28-Feb-11 10:24 
AnswerRe: OO design: Copying data from class A to B Pin
Eddy Vluggen26-Jan-11 8:07
professionalEddy Vluggen26-Jan-11 8:07 
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor26-Jan-11 21:02
Nilzor26-Jan-11 21:02 
AnswerRe: OO design: Copying data from class A to B Pin
Ian Shlasko26-Jan-11 10:03
Ian Shlasko26-Jan-11 10:03 
AnswerRe: OO design: Copying data from class A to B Pin
Pete O'Hanlon26-Jan-11 22:41
mvePete O'Hanlon26-Jan-11 22:41 
AnswerRe: OO design: Copying data from class A to B Pin
GParkings2-Sep-11 2:30
GParkings2-Sep-11 2:30 
just to clarify what you are asking,

Class A has properties X and Y
Class B has properties Y and Z

given

an instance of class A such that X = i and Y = j
an instance of class B such that Y = k and Z = l

you would like to achieve a modification to the state of class A such that X = i and Y = k

is that correct?

1. would not achieve this, it could only result in an instance of class A where Y = k and X = default(x)

2. likewise this would not be able to set the X property

3. This could achieve the result you are after, it would copy values for common properties from the argument instance to the instance of the class on which the method is hosted

4. as with 1 and 2 this would not be able to populate the X property

so, if the initial assumptions of your question are correct, i would go with option 3 Poke tongue | ;-P

either that or I've misunderstood completely and have resorted to flinging answers at a non-existent hypothetical question, sadly that wouldn't be the least productive thing I've done today....
GeneralRe: OO design: Copying data from class A to B Pin
Nilzor2-Sep-11 3:27
Nilzor2-Sep-11 3:27 
GeneralRe: OO design: Copying data from class A to B Pin
GParkings2-Sep-11 4:16
GParkings2-Sep-11 4:16 
QuestionDifference between Generalization, Abstraction, Encapsulation? Pin
variantseeker19-Jan-11 15:58
variantseeker19-Jan-11 15:58 
AnswerRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi19-Jan-11 22:23
professionalPraveen Raghuvanshi19-Jan-11 22:23 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Pravin Patil, Mumbai26-Jan-11 3:39
Pravin Patil, Mumbai26-Jan-11 3:39 
GeneralRe: Difference between Generalization, Abstraction, Encapsulation? Pin
Praveen Raghuvanshi26-Jan-11 5:01
professionalPraveen Raghuvanshi26-Jan-11 5:01 
QuestionHow to package the Factory into separate component assembly? Pin
Chesnokov Yuriy17-Jan-11 20:26
professionalChesnokov Yuriy17-Jan-11 20:26 
AnswerRe: How to package the Factory into separate component assembly? Pin
dasblinkenlight18-Jan-11 4:21
dasblinkenlight18-Jan-11 4:21 
QuestionVoting Functionality -- Incoming Traffic Pin
Civic0614-Jan-11 4:58
Civic0614-Jan-11 4:58 
AnswerRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick14-Jan-11 5:49
Ray Cassick14-Jan-11 5:49 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Civic0619-Jan-11 23:30
Civic0619-Jan-11 23:30 
GeneralRe: Voting Functionality -- Incoming Traffic Pin
Ray Cassick20-Jan-11 8:45
Ray Cassick20-Jan-11 8:45 
QuestionAny good sofwtare design software? Pin
venomation12-Jan-11 15:03
venomation12-Jan-11 15:03 
AnswerRe: Any good sofwtare design software? Pin
Pete O'Hanlon12-Jan-11 21:25
mvePete O'Hanlon12-Jan-11 21:25 
AnswerRe: Any good sofwtare design software? Pin
David Skelly12-Jan-11 22:23
David Skelly12-Jan-11 22:23 
AnswerRe: Any good sofwtare design software? Pin
Stefan_Lang4-Feb-11 0:43
Stefan_Lang4-Feb-11 0:43 
QuestionNeed Design Ideas Pin
Kevin Marois12-Jan-11 10:41
professionalKevin Marois12-Jan-11 10:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.