In some programming assignments, you may need to show the
trajectory of an item, such as a person, an animal, a car, an air plane, a
train, etc. There is no strict about where to start. Still, you would need to
recognize and identify how the trajectory would be traced. We will implement a
simple example of a car moving on a road. For simplicity, on only will we assume
a straight road, but also we will not deal with conflicts (such as collision
(detection)).

To trace the trajectory of an object, you should
determine where it would start and where it would stop. For our example,
we will have a car that start on the left section of a view. When it gets
to the right extreme, we will simply change its direction and move it
opposite.

Most simulations and trajectory assignments use more
than one object. This also means that you would deal with more than one
object and probably more than one trajectory. Here is a simple example of
how you may address this problem.