1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#ifndef VELOCITY_H #define VELOCITY_H #include "acceleration.h" class Velocity { private: float dx; float dy; public: Velocity(); Velocity(const float dx, const float dy); void setDx(const float dx); void setDy(const float dy); float getDx(); float getDy(); void addVelocity(Velocity &vel); void update(Acceleration &acc); }; #endif