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
What are the different parameter passing mechanisms to a function? The different parameter-passing mechanisms are given below: 1.   Call by value 2.   Call by value-resu

Conversion of the decimal number 82.67 into Hexadecimal ? Ans. (1010010.10101011) 2 is the binary equivalent of decimal number 82.67. Now convert each 4-bit binary into an equ

Propositional Inference Rules: Propositional Inference Rules Equivalence rules are mostly useful because of the vice-versa aspect, that means like we can search backwards and

Illustrate about probability of collision? Probability of collision: There is a triangle and on this let’s assume that there are three ants one on each corner and are free t

MX is conceptually easy, yet bears the fruit of years of domain experience and research. In a nutshell, JMX describes a standard means for applications to expose management functio

Multiple Instruction and Single Data stream (MISD): In this type of organization multiple processing elements are ordered under the control of multiple control units. Every contro

Microsoft Visual basic has its host of problems one such being macros, Macros can be formed which can make havoc for a programmer with good intentions. Also the security issue rest

Q. Explain about Quarter Inch Cartridge Tapes? Quarter Inch Cartridge Tapes (QIC Standard): These tape cartridges record information sequentially in a track with one head. Wh

A class that has no functionality of its own is an Adaptor class in C++. Its member functions hide the use of a third party software component or an object with the non-compatible

How to select valid lines for secondary list? To stop the user from selecting invalid lines, ABAP/4 offers various possibilities.  At the end of the processing block END-OF-SEL