when is an object said to be at rest give an example
Rest (physics) In physics, rest is the state of an object being stationary relative to a particular frame of reference or another object; when the position of a body with respect to its surroundings does not change with time it is said to be "at rest". According to the theory of relativity, it is said that an object is "at rest relative to" another. For example, a train decelerates approaching a station and eventually comes to rest alongside the platform. The train can be said to be "at rest with respect to the station", or, as the correct frame of reference is usually implicit and/or provided by context, simply "at rest". In reality, there is nothing at absolute rest. For example, Earth's gravitation constantly pulls objects toward its surface, while Earth is one of the objects the Sun constantly pulls towards itself, causing it to orbit the Sun; the Sun, in turn, orbits the center of the Milky Way; and so on.
Virtual function In object-oriented programming, when a derived class inherits from a base class, an object of the derived class may be referred to via a pointer or reference of the base class type instead of the derived class type. If there are base class methods overridden by the derived class, the method actually called by such a reference or pointer can be bound either 'early' (by the compiler), according to the declared type of the pointer or reference, or 'late' (i.e., by the runtime system of the language), according to the actual type of the object referred to.