Last Updated:2025/12/05

(object-oriented programming) The problematic situation where a base class contains methods which mutate an object in a manner which may invalidate a (stronger) invariant found in a derived class, violating the Liskov substitution principle. For example, if a circle is modelled as a subtype of an ellipse, and the ellipse has a method that stretches it on one axis, the circle must also implement that method despite it making no sense for a circle.

音声機能が動作しない場合はこちらをご確認ください
See correct answer

circle-ellipse problem

Edit Histories(0)
Source Word

circle-ellipse problem

Noun
Japanese Meaning
オブジェクト指向プログラミングにおいて、基底クラスに定義されたメソッドが、派生クラスで保持される強固な不変条件を破ってしまう可能性がある設計上の問題。例えば、楕円のサブタイプとして円をモデル化した際に、楕円に備わった変形メソッドを円にも実装させる必要が生じ、円としての特性に矛盾が生じるケースを示す。
What is this buttons?

オブジェクト指向のAPIを設計する際には、円を楕円のサブタイプとしてモデル化するという問題を避けるべきです。なぜならそれがサブクラスに強い不変条件を破るような変更を実装させてしまうからです。

Dictionary quizzes to help you remember vocabulary

Edit Histories(0)

Login / Sign up

 

Download the app!
DiQt

DiQt

Free

★★★★★★★★★★