1,300
28
Essay, 3 pages (700 words)

Using return afstandtotaal; } public static float puntafstand(puntentijd

using System; using System. Collections. Generic; using System. Linq; using System. Text; using Android. App; using Android. Content; using Android. OS; using Android. Runtime; using Android. Views; using Android. Widget; using Android. Graphics; namespace RunningApp{    class Analyse    {        public static string Tracknaarstring(List track)        {            string trackstringres = “”;            int t = 0;            foreach (PuntEnTijd pt in track)            {                t++;                string voegtoe = “”;                voegtoe += pt. punt. X. ToString() + “?” + pt. punt. Y. ToString() + “?” + pt. tijd. ToString() + “?” + pt. pauze. ToString();                if (t < track. Count)                {                    voegtoe += "|";                }                trackstringres += voegtoe;            }            return trackstringres;        }            public static List Stringnaartrack(string trackstring)        {            List trackfake = new List();            string punten = trackstring. Split('|');            foreach (string punt in punten)            {                string puntdata = punt. Split('?');                PointF p = new PointF();                DateTime t;                p. X = float. Parse(puntdata0);                p. Y = float. Parse(puntdata1);                t = DateTime. Parse(puntdata2);                bool pz = false;                PuntEnTijd nieuwpunt = new PuntEnTijd(p, t, pz);                trackfake. Add(nieuwpunt);            }            return trackfake;        }        public static float Track_Total_Distance(List track)        {            PointF p = new PointF(0, 0);            DateTime t = DateTime. Now;            bool pz = false;            PuntEnTijd puntoud = new PuntEnTijd(p, t, pz);            PuntEnTijd puntnieuw;            int teller = 0;            float afstandtotaal = 0f;            foreach (PuntEnTijd punt in track)            {                puntnieuw = punt;                if (teller == 0)                {                }                else                {                    if (puntoud. pauze == true)                    {                    }                    else                    {                        if (puntnieuw. pauze == true)                        {                        }                        else                        {                            afstandtotaal += PuntAfstand(puntnieuw, puntoud);                        }                    }                }                puntoud = puntnieuw;                teller++;            }            return afstandtotaal;        }        public static float PuntAfstand(PuntEnTijd eerstepunt, PuntEnTijd tweedepunt)         {            float lengteX = Math. Abs(eerstepunt. punt. X - tweedepunt. punt. X);            float lengteY = Math. Abs(eerstepunt. punt. Y - tweedepunt. punt. Y);            return lengteX + lengteY;        }    }    public static float PuntTijdVerschil(knooppunt een, knooppunt twee)    {        return Math. Abs(twee. timesincestart - een. timesincestart);    }}

Thank's for Your Vote!
Using return afstandtotaal; } public static float puntafstand(puntentijd. Page 1
Using return afstandtotaal; } public static float puntafstand(puntentijd. Page 2
Using return afstandtotaal; } public static float puntafstand(puntentijd. Page 3

This work, titled "Using return afstandtotaal; } public static float puntafstand(puntentijd" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2021) 'Using return afstandtotaal; } public static float puntafstand(puntentijd'. 28 December.

Reference

AssignBuster. (2021, December 28). Using return afstandtotaal; } public static float puntafstand(puntentijd. Retrieved from https://assignbuster.com/using-return-afstandtotaal-public-static-float-puntafstandpuntentijd/

References

AssignBuster. 2021. "Using return afstandtotaal; } public static float puntafstand(puntentijd." December 28, 2021. https://assignbuster.com/using-return-afstandtotaal-public-static-float-puntafstandpuntentijd/.

1. AssignBuster. "Using return afstandtotaal; } public static float puntafstand(puntentijd." December 28, 2021. https://assignbuster.com/using-return-afstandtotaal-public-static-float-puntafstandpuntentijd/.


Bibliography


AssignBuster. "Using return afstandtotaal; } public static float puntafstand(puntentijd." December 28, 2021. https://assignbuster.com/using-return-afstandtotaal-public-static-float-puntafstandpuntentijd/.

Work Cited

"Using return afstandtotaal; } public static float puntafstand(puntentijd." AssignBuster, 28 Dec. 2021, assignbuster.com/using-return-afstandtotaal-public-static-float-puntafstandpuntentijd/.

Get in Touch

Please, let us know if you have any ideas on improving Using return afstandtotaal; } public static float puntafstand(puntentijd, or our service. We will be happy to hear what you think: [email protected]