Explain the ISA and HASA class relationships. How would you
implement each in a class design?
Answers were Sorted based on User's Feedback
Answer / nishikant sahu
"ISA" a relationship is aka Inheritance and used to extent
the capability of Base, whereas "HASA" relationship is aka
Containment use to take the all properties of BASE.
| Is This Answer Correct ? | 19 Yes | 3 No |
Answer / neelkamal yadav
A specialized class "is" a specialization of another class and, therefore, has the ISA relationship with the other class. An Employee ISA Person. This relationship is best implemented with inheritance. Employee is derived from Person. A class may have an instance of another class. For example, an employee "has" a salary, therefore the Employee class has the HASA relationship with the Salary class. This relationship is best implemented by embedding an object of the Salary class in the Employee class.
The answer to this question reveals whether the applicant has an understanding of the fundamentals of object- oriented design, which is important to reliable class design.
There are other relationships. The USESA relationship is when one class uses the services of another. The Employee class uses an object (cout) of the ostream class to display the employee's name on the screen, for example. But if the applicant gets ISA and HASA right, you don't need to go any further.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
A specialized class "is" a specialization of another class
and, therefore, has the ISA relationship with the other
class.
This relationship is best implemented by embedding an
object of the Salary class in the Employee class.
| Is This Answer Correct ? | 9 Yes | 13 No |
What is the iunknown interface?
What is c++ manipulator?
What is size of Empty Class?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Write a note about the virtual member function?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
Why is it necessary to use a reference in the argument to the copy constructor?
What is abstract keyword in c++?
Does c++ support exception handling?
What is data abstraction? How is it different from data encapsulation?
How to stop conversions among objects?
What do you mean by function overriding & function overloading in c++?