So, I'm pretty new to coding and recently started doing a computer science internship specifically for high school students like myself. I haven't been doing much at my internship lately, but today the teacher who is in charge of this internship told me that he wanted me to start implementing algorithms, which isn't something I have a lot of experience with. I would appreciate if anyone was willing to give me some pointers and some guidance.
Basically, we are working with robotics and using Java. What he wants me to do is use Math.random to create a bunch of points on a 2 dimensional plane. These points will go into an array, and divided between x coordinated and y coordinates. Then, a for loop will run, and these points will move. These new points will be put into a new array, and this will continue on and on until all the points get to a certain spot, and they will all stop running.
All that he has asked me to do is to create the initial for loop that will run the math.random function, put these numbers into an array, and then run it again to create a new array. It also needs to calculate the total distance from each points, so it will take say point 1, it will be all the distances added up and then divided by n (he said to start with 50 points).
I am learning for loops, arrays, while loops, and all of the above, but I just don't have a lot of experience with it. I was wondering if I could just get some guidance. It will all be very much appreciated.