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
Signaling - Universal Serial Bus: USB supports following signaling rates: o   A low speed rate of 1.5 Mbit/s is defined by USB 1.0. This is so much similar to "full speed"

The various memory allocation functions are described below: (i) malloc( ) : It is a memory allocation function that assigns requested size of bytes and returns a pointer to t

It is not essential to maintain the Parent-Child relationship among the tables in Logical Database Structure. False. One has to handle the Parent-Child relationship.

Q. FORALL Statement in fortran? The FORALL statement permits for more common assignments to sections of an array. A FORALL statement has general form.   FORALL ( triplet, ..

Assembler: Typically a modern assembler makes object code by translating assembly instruction into op codes, & by resolving symbolic names for memory locations and any other e

Make a console application. Add class 'Account' having variables as num (integer) name (String), bal (double), ac_code (byte). Describe four different constructors to initialize th

The combinational circuits employ the comparators for comparing the numbers and storing them on the basis of maximum and minimum functions. Likewise in the interconnection networks

Branch (control) hazards in computer architecture : Branching hazards (also called control hazards) take place when the processor is told to branch -for example, if a defin

Explain the different page replacement policies. Various page replacement algorithms are briefly explained below: 1. First-in, first-out FIFO page replacement algorith

An operating system contains 3 resource classes. The number of resource units in these classes is 7, 7 and 10. The current resource allocation state is shown below: