GeeksforGeeks » Interview Questions

Microsoft Interview Question for Software Engineer/Developer about Object Oriented

(4 posts)
  1. gagan
    guest
    Posted 1 year ago #

    Given an Ellipse class can you derive a Circle class from it? What all methods would you include in the circle class and what all in ellipse? Design a class of curve from which Circle and Ellipse can be inherited.

  2. Manish jain
    guest
    Posted 1 year ago #

    we should not
    behavior are different

  3. TikTok
    guest
    Posted 1 year ago #

    The major and minor axis of a circle is the same. The focus is 0;

  4. Ravi
    guest
    Posted 9 months ago #

    The class which would inherited for both would be the class of cones i think,
    because to make a circle a cone is cut horizontally and for ellipse a cone is cut at an angle.

    remember the question says class of curves might contain some other curves
    So class should contain
    1) height of cone
    2) base radius of cone


Reply

You must log in to post.

RSS feed for this topic