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. How is an instruction represented? Instruction is signified as a sequence of bits. A layout of an instruction is called as instruction format. Instruction formats are princi


Not Recently Used Page Replacement Algorithm The not recently used abbreviated as NRU page replacement algorithm works on the subsequent principle: while a page is referenced,

What is a half-adder? Explain a half-adder with the help of truth-table and logic diagram. Ans. Half Adder: It is a logic circuit for the addition of two 1-bit numbers is term

Q. Illustrate working of Pocket and PC-Card Modems? Pocket Modems: Small external Modems used with notebook PCs.  PC-Card Modems:  PC and Modems are read with PCMCIA slots w

Cutoff Search : To require a mini and max search in a game on stage situation is, in which all we have is just do that programme our agent to look at the intact that search tr

Consider the state transition diagram of Figure 3.9b . Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/S

System is a word which is derived from the Greek word 'Systema' which means an organized relationship among components. A System can be defined as orderly grouping of interdepen

Q. What is Memory Address Register? Memory Address Register (MAR): It specifies address of memory location from that data or instruction is to be accessed (read operation) or t

Problem: (a) (i) Distinguish between Complex Type and Simple Type elements. (ii) List two benefits while using XSDs in XML data modeling. (b) Both XML schema and XSL u