

In motion in straight line,take the direction in which the object is moving as positive direction, and the opposite direction is negative.
In case of motion under gravity, the downwards direction is taken as positive because acceleration g is positive in this direction, and the upwards direction is taken as negative direction.

