1.

Can Circle Be Called An Ellipse?

Answer»

Yes, a CIRCLE can be called an ellipse. LET's understand this concept with the help of an EXAMPLE, if ellipse has a member function named as setsize with the widthQ of the object as x and its HEIGHT() as y. There are two kinds of relationships that exist between a circle and an ellipse:

  • Circle and ellipse can be made as two different classes :

In this case, ellipse can be derived from AsymmetricShape class and has a member function named as setSize(x,y). On the contrary, circle can be derived from SymmetricalShape class and has a member function named as setSize(size). Therefore, they both are UNRELATED in its member functions as well as in their derivations.

  •  Circle and ellipse can be derived from a base class :

In this case, circle and ellipse both can be inherited from the class Oval because class Oval can only have setSize(size) member function which sets the height() and widthQto the size of the object.

Yes, a circle can be called an ellipse. Let's understand this concept with the help of an example, if ellipse has a member function named as setsize with the widthQ of the object as x and its height() as y. There are two kinds of relationships that exist between a circle and an ellipse:

In this case, ellipse can be derived from AsymmetricShape class and has a member function named as setSize(x,y). On the contrary, circle can be derived from SymmetricalShape class and has a member function named as setSize(size). Therefore, they both are unrelated in its member functions as well as in their derivations.

In this case, circle and ellipse both can be inherited from the class Oval because class Oval can only have setSize(size) member function which sets the height() and widthQto the size of the object.



Discussion

No Comment Found