9/23/19 ------- Here are the activities we did in class today (to practice using arrays). 1. Write a program called arrays.cpp. Declare an array with the names of the 7 days of the week. Write a function to print an array of strings. Write a function to find an item by name (return index, or -1). Find the position of "Wed". Write a function to reverse the array. (Do this "in place" so you don't have to allocate a new array. Hint, think of using a series of "swaps".) Write a function to remove (all instances of) an item from a list. (Hint, the function should return the number of remaining items.) Write a function to circularly permute the array. Use it to make Wed the first day of the week. 2. Write a program called geometry.cpp. Here are a set of coordinates of 4 points (in 2D) defining a geometrical object: (0,0), (5,-1), (10,0), (5,10). First, calculate the magnitude of each point. Then calculate the center of mass (the mean X value and the mean Y value). (Hint, you might want to use 2 floats as "output args" that are passed-by-reference to the function to hold the answers, or an array of 2 floats.) Print out the center of mass and its magnitude. Then determine which point is farthest from the center of mass. Finally, rotate the coordinates of all the points by 45 degrees. To do this, you will need to calculate a rotation matrix for an angle theta. Write a function that takes a 2x2 array and float and fills in values as shown here https://en.wikipedia.org/wiki/Rotation_matrix Don't forget to convert degrees to radians. (The next step would be to compute the new coordinates for each point by multiplying them by the rotation matrix...)