Write a void method Shift that takes three parameters A, p, d.
A is an array, p is the number of positions and d is the direction (L = left, R = right). The method should shift the contents of A p positions in the d direction.
(B) To test your method, write a program that reads an array of 10 elements then calls Shift twice and prints the array after each call.