Click here to Skip to main content
15,900,254 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use a com dll without embedded typelibrary in it? Pin
Covean23-Jun-10 0:41
Covean23-Jun-10 0:41 
GeneralRe: How to use a com dll without embedded typelibrary in it? Pin
kcynic23-Jun-10 19:30
kcynic23-Jun-10 19:30 
GeneralMessage Closed Pin
23-Jun-10 2:04
stancrm23-Jun-10 2:04 
GeneralRe: How to use a com dll without embedded typelibrary in it? Pin
kcynic23-Jun-10 19:49
kcynic23-Jun-10 19:49 
Questionclass relationships [modified] Pin
netJP12L22-Jun-10 19:41
netJP12L22-Jun-10 19:41 
AnswerRe: class relationships Pin
phil.o22-Jun-10 23:54
professionalphil.o22-Jun-10 23:54 
GeneralRe: class relationships Pin
netJP12L23-Jun-10 2:59
netJP12L23-Jun-10 2:59 
AnswerRe: class relationships Pin
DaveyM6923-Jun-10 3:39
professionalDaveyM6923-Jun-10 3:39 
So you need to break down the requirements into logical parts.

Employee can have zero or more managers.

So, your Employee class will need a property that has a variable size that is of type Manager. Perhaps a List<Manager>

Manager is an employee...

So the Manager class should derive from Employee as you have already done.

...who has one or more other employees reporting to him.

So the Manager class needs an additional property that has a variable size that is of type Employee. Possibly, the extra Manager class isn't needed as checking this property is > 0 will indicate that they are manager anyway.

This is what programming is all about, turning real world situations into code and in the case of OOP creating objects to represent them and adding properties to give the details/descriptions of thos objects and methods/events for the things they actually do. Not really that hard to grasp.
Dave

If this helped, please vote & accept answer!


Binging is like googling, it just feels dirtier. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

GeneralRe: class relationships Pin
netJP12L23-Jun-10 5:11
netJP12L23-Jun-10 5:11 
GeneralRe: class relationships [modified] Pin
DaveyM6923-Jun-10 23:31
professionalDaveyM6923-Jun-10 23:31 
AnswerRe: class relationships Pin
yu-jian27-Jun-10 9:41
yu-jian27-Jun-10 9:41 
QuestionFacing Problem in "Heaton Research" for crawling data in C# for "SQLWorkloadManager" Pin
deepakmcn22-Jun-10 19:33
deepakmcn22-Jun-10 19:33 
QuestionHow to prevent my .NET DLL to be decompiled? Pin
Isaac Gordon22-Jun-10 19:12
Isaac Gordon22-Jun-10 19:12 
AnswerRe: How to prevent my .NET DLL to be decompiled? Pin
Abhinav S22-Jun-10 20:38
Abhinav S22-Jun-10 20:38 
AnswerRe: How to prevent my .NET DLL to be decompiled? Pin
riced22-Jun-10 20:39
riced22-Jun-10 20:39 
AnswerRe: How to prevent my .NET DLL to be decompiled? Pin
bindasrakesh29-Nov-10 21:59
bindasrakesh29-Nov-10 21:59 
QuestionActiveDirectory (DirectoryEntry) Set/Get Attributes - Cached? Pin
Sir Dot Net22-Jun-10 11:27
Sir Dot Net22-Jun-10 11:27 
AnswerRe: ActiveDirectory (DirectoryEntry) Set/Get Attributes - Cached? Pin
Sir Dot Net22-Jun-10 11:30
Sir Dot Net22-Jun-10 11:30 
QuestionMessage Removed Pin
22-Jun-10 6:43
tarun_jeet22-Jun-10 6:43 
AnswerRe: Base Class Authetication ?? Pin
Ennis Ray Lynch, Jr.22-Jun-10 7:40
Ennis Ray Lynch, Jr.22-Jun-10 7:40 
GeneralMessage Removed Pin
22-Jun-10 7:48
tarun_jeet22-Jun-10 7:48 
GeneralRe: Base Class Authetication ?? Pin
Ennis Ray Lynch, Jr.22-Jun-10 8:04
Ennis Ray Lynch, Jr.22-Jun-10 8:04 
GeneralOh, and Pin
Ennis Ray Lynch, Jr.22-Jun-10 8:13
Ennis Ray Lynch, Jr.22-Jun-10 8:13 
GeneralRe: Base Class Authetication ?? Pin
Not Active22-Jun-10 10:08
mentorNot Active22-Jun-10 10:08 
AnswerRe: Base Class Authetication ?? Pin
Paladin200022-Jun-10 8:10
Paladin200022-Jun-10 8:10 

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.