using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter02 { /// /// Example01: Calculating the Average Velocity and Speed /// Find the displacement, average velocity, and average speed /// of the car in Figure 2.1a between positions A and F. /// public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { L.Position pA = new L.Position(); pA.X = 30.0; L.Position pF = new L.Position(); pF.X = -53.0; L.Displacement d = new L.Displacement(pF,pA); result = d.X.ToString()+"\r\n"; L.Time t = new L.Time(); t.Interval = 50.0; L.Velocity v = new L.Velocity(d,t); result += v.X.ToString(); } } } /* -83 -1.66 */