Exemplo n.º 1
0
 public static Speed operator *(Time t, Acceleration a)
 {
     Speed v = new Speed(0);
     v.distanceType = a.distanceType;
     Converter converter = new Converter();
     v.value = converter.ConvertToSI(a).value * converter.ConvertToSI(t).value;
     return converter.ConvertFromSI(v);
 }
Exemplo n.º 2
0
 public new string GiveValueInSI()
 {
     Time x = new Time(value);
     x.timeType = timeType;
     Converter conv = new Converter();
     string message = conv.ConvertToSI(x).value + " s";
     return message;
 }
Exemplo n.º 3
0
 public static Time operator /(Speed v, Acceleration a)
 {
     Time t = new Time(0);
     t.timeType = v.timeType;
     Converter converter = new Converter();
     t.value = converter.ConvertToSI(v).value / converter.ConvertToSI(a).value;
     return converter.ConvertFromSI(t);
 }
Exemplo n.º 4
0
 public static Distance operator *(Time t, Speed v)
 {
     Distance s = new Distance(0);
     s.distanceType = v.distanceType;
     Converter converter = new Converter();
     s.value = converter.ConvertToSI(v).value * converter.ConvertToSI(t).value;
     return converter.ConvertFromSI(s);
 }
Exemplo n.º 5
0
 public static Time operator /(Distance s, Speed v)
 {
     Time t = new Time(0);
     t.timeType = v.timeType;
     Converter converter = new Converter();
     t.value = converter.ConvertToSI(s).value / converter.ConvertToSI(v).value;
     return converter.ConvertFromSI(t);
 }
Exemplo n.º 6
0
 public new string GiveValueInSI()
 {
     Distance x = new Distance(value);
     x.distanceType = distanceType;
     Converter conv = new Converter();
     string message = conv.ConvertToSI(x).value + " m";
     return message;
 }
Exemplo n.º 7
0
 public string GiveValueInSI()
 {
     Speed x = new Speed(value);
     x.distanceType = distanceType;
     x.timeType = timeType;
     Converter conv = new Converter();
     string message = conv.ConvertToSI(x).value + " m/s";
     return message;
 }
Exemplo n.º 8
0
 public static Acceleration operator /(Speed v, Time t)
 {
     Acceleration a = new Acceleration(0);
     a.distanceType = v.distanceType;
     a.timeType = t.timeType;
     Converter converter = new Converter();
     a.value = converter.ConvertToSI(v).value / converter.ConvertToSI(t).value;
     return converter.ConvertFromSI(a);
 }
Exemplo n.º 9
0
 public string GiveValueInSI()
 {
     Acceleration x = new Acceleration(value);
     x.distanceType = distanceType;
     x.timeType = timeType;
     Converter conv = new Converter();
     string message = conv.ConvertToSI(x).value + " m/(s^2)";
     return message;
 }
Exemplo n.º 10
0
        public static Speed operator /(Distance s, Time t)
        {
            Speed v = new Speed(0);
            v.distanceType = s.distanceType;
            v.timeType = t.timeType;
            Converter converter = new Converter();
            v.value = converter.ConvertToSI(s).value / converter.ConvertToSI(t).value;

            return converter.ConvertFromSI(v);
        }
Exemplo n.º 11
0
 static void Main(string[] args)
 {
     Time t = new Time(5);
     Speed v = new Speed(10);
     Distance s = new Distance(10);
     Acceleration a = new Acceleration(3);
     s = 2 + (a * (t^2)) / 2;
     Converter conv = new Converter();
     Console.WriteLine(a.GiveValueInSI());
     Console.ReadLine();
 }