Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [TestMethod]
- public void Second_EV_D()
- {
- //Arrange
- double t = 12;
- double vi = 0;
- double a = 9.8;
- double Evf = 117.6;
- double Ed = 705.6;
- //Act
- double uno = Assignment_3.MotionFunctions.FinalVelocity(vi, a, t);
- double dos = Assignment_3.MotionFunctions.ReturnDistance(vi, a, t);
- //Assert
- Assert.AreEqual(Evf, 0.0001, uno);
- Assert.AreEqual(Ed, 0.0001 , dos);
- }
- public static double FinalVelocity(double startingVelocity, double acceleration, double time)
- {
- // v1 = v0 + a t (2)
- // a = acceleration (m/s2)
- // t = time taken (s)
- return (startingVelocity + acceleration * time);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement