Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Write a generic class Pair which has 2 type parameters, F and S

Question

<ol><li>Write a generic class Pair which has 2 type parameters, F and S, representing the type of the

first and second elements of a pair respectively. </li><li>Add <em>get</em> and <em>set</em> methods for the first and second elements of the pair.</li><li>Override the toString() method to display the first and second values of the pair in a format of your choosing.</li><li>Use the Pair class in a program that creates an ArrayList of 10 Pair objects containing values of your choosing. The program will then print the string representation of each Pair to System.out (i.e., use the toString() method).</li><li>Take a screenshot of your output and paste it into the Word document you created for the first exercise, but place the screenshot under a header for âExercise 2.â</li></ol>

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"