Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. [TestMethod]
  2. public void Second_EV_D()
  3. {
  4. //Arrange
  5. double t = 12;
  6. double vi = 0;
  7. double a = 9.8;
  8. double Evf = 117.6;
  9. double Ed = 705.6;
  10. //Act
  11. double uno = Assignment_3.MotionFunctions.FinalVelocity(vi, a, t);
  12. double dos = Assignment_3.MotionFunctions.ReturnDistance(vi, a, t);
  13. //Assert
  14. Assert.AreEqual(Evf, 0.0001, uno);
  15. Assert.AreEqual(Ed, 0.0001 , dos);
  16. }
  17.  
  18. public static double FinalVelocity(double startingVelocity, double acceleration, double time)
  19. {
  20. // v1 = v0 + a t (2)
  21. // a = acceleration (m/s2)
  22. // t = time taken (s)
  23. return (startingVelocity + acceleration * time);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement