Translation (geometry) Translation (geometry) In Euclidean geometry, a translation is a geometric transformation that moves every point of a figure or a space by the same distance in a given direction. In Euclidean geometry a transformation is a one-to-one correspondence between two sets of points or a mapping from one plane to another. A translation can be described as a rigid motion: the other rigid motions are rotations, reflections and glide reflections. A translation can also be interpreted as the addition of a constant vector to every point, or as shifting the origin of the coordinate system. A translation operator is an
Is-a has to know about every derivative classes of Shape class. Also, it should be changed whenever new subclass of Shape are created. In object-oriented design, many view the structure of this as anathema. Here is a more subtle example of violation of LSP: This works well but when it comes to Square class, which inherits Rectangle class, it violates LSP even though the is-a relationship holds between Rectangle and Square. Because square is rectangular. The following example overrides two functions, Setwidth and SetHeight, to fix the problem. But fixing the code implies that the design is faulty. The following example,