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 is polymorphism

We have to use 3 MPI communications: Plz the code in C++     1.  MPI_Scatter 2.  MPI_Alltoall 3.  MPI_Gather     **The length of the array will be determined by the user Fir

Home Banking: E-commerce is used in Home Banking as single call or single click. Online banking (Internet banking) is a term used for performing transactions, payments etc. ove

Give the example of Spreadsheet By selecting cell C1 and dragging the formula down to C5 the below formulae will be replicated in C2 to C5: (A2*B2), (A3*B3), (A4*B4) and (A5*B5

Explain bit-O-Ring technique. The micro program represents that branches are not always made to a one branch address. This is a direct consequence of combining easy micro routi

Q. Illustrate what is a ion pair energy? Answer:- Ion energy contains electric charges called protons (+) and neutrons (0) and electrons (-) charges. It's present in an at

Define Bandwidth? When transferring blocks of data, it is of interest to know how much time is required to transfer an entire block, as blocks can be variable in size it is use

how to make a dfd of simple calculator?

CGI is significant whenever you require to retain state information about a user, or run an application which communicates with the server. Things like guestbook's, Chat clients, d

What is phase encoding or Manchestor encoding?  It is the method for combining clock information with data. It is a scheme in which alters in magnetization occur for each data