Explain the isa and hasa class relationships, Computer Engineering

How would you implement each in a class design?

Ans) A specialized class "is" a specialization of another class and, thus, has the ISA relationship with the other class. An Employee ISA Person. This relationship is best executed with inheritance. Employee is derived from Person. A class may have an instance of another class. For example, an employee "has" a salary, thus the Employee class has the HASA relationship with the Salary class. This relationship is best executed by embedding an object of the Salary class in the Employee class.       

 

 

Posted Date: 4/9/2013 12:55:03 AM | Location : United States







Related Discussions:- Explain the isa and hasa class relationships, Assignment Help, Ask Question on Explain the isa and hasa class relationships, Get Answer, Expert's Help, Explain the isa and hasa class relationships Discussions

Write discussion on Explain the isa and hasa class relationships
Your posts are moderated
Related Questions
Q. What do you mean by Perfect Shuffle Permutation? Perfect Shuffle Permutation: It was proposed by Harold Stone (1971). Consider N objects each is represented by n bit number

Write a menu-driven program to change a time in seconds to other units (minutes, hours, etc.).  The main script will loop to continue until the user chooses to exit.  Every time in

Q. What is Domain explain? Domain can be an apartment complex, a town or even a country. Sub-domains can correspond to organizations like expertsmind. United States comes under

Describe the Working of CRT The electron beam produces a tiny, bright visible spot when it strikes the phosphor-coated screen. A colour CRT monitor has three different coloured

Period and Space Tradeoffs - artificial intelligence: In practice, you are going to stop your agent for long term using in searching goal at some stage if it has not found a s


Contact-based keyboards employ switches directly. Though they have a comparatively shorter life they are the most preferred type these days because of their lower cost.  Three such

Add 648 and 487 in BCD code. Ans. In BCD Code, addition of 648 and 487: 6 4 8  =  0 1 1 0   0 1 0 0      1 0 0 0 4 8 7  =  0 1 0 0   1 0 0 0      0 1 1 1 ---------------------

to develop an adaptive concept map providing personalized learning for Operating System subject with text file(in any form like html,ppt,txt,doc,pdf)as input

Control Dependence Segments or Instructions in a program can include control structures. So, dependency among statements is able to be in control structures also. However the