night sailor

night sailor

  • NA
  • 20
  • 39.4k

Regarding "HAS A" Relationship

May 30 2011 3:26 AM
Hi,

I have one doubt regarding understanding of "HAS-A" relationship between classes.
Consider i have two classes : Employee and Address. Now, i want to know when "HAS-A" relation will be implemented?

1) When i am simply creating member in Employee class like :
        private Address empAddress ;
        public Address _Address
        {
             get{}
             set{}
        }

2) when i am creating whole Address class inside Employee class as Nested class.

Thanks,
Himanshu

Answers (2)