Question: Please write the answers clear and easy to be read and please sipirt the answers so It would be in order Given an algorithm to

 Please write the answers clear and easy to be read and

please sipirt the answers so It would be in order Given an

algorithm to reverse the elements of an array (see attached file) create

Please write the answers clear and easy to be read and please sipirt the answers so It would be in order Given an algorithm to reverse the elements of an array (see attached file) create a new class ReverseGenericDemo that accepts an array of any type using the Java generics framework. Test the class with an array of at least 5 elements for Strings and Songs. Sample output: [2, 4, 6, 8, 10, 12, 14, 16] 16, 14, 12,10, 8, 6, 4, 2] are, you, as, backwards, as, I, am, buddy] [buddy, am, I, as, backwards, as, you, are] Beat It (Michael Jackson), Let It Be (The Beatles), Seven Nation Army (White Stripes), Fifth Symphony (Beethovan), Piano Man (Billy Joel)] Piano Man (Billy Joel), Fifth Symphony (Beethovan), Seven Nation Army (White Stripes), Let It Be (The Beatles), Beat It (Michael Jackson)] package lab05; import java.util.Arrays; Lab 5 Given a method that reverses the int elements in an array, modify it so that it is generic and reverses elements of any type array. When it is finished, rename it to ReverseGenericArray.java Make each array contain at least 5 elements Song is a class you will write. It should contain fields for title and artist, as well as a 'toString' method to override Arrays.toString * Test it with Integer, String, and Song arrays kx TODO: make this generic public class ReverseIntArray t public static void reverse(int data) int low - 0, high - data. length - 1; while (low

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!