Question: please read everything and do code as directed by details 1. SUMMARY a. Using Java's Generics framework, make two classes... one that stores 2 items


1. SUMMARY a. Using Java's Generics framework, make two classes... one that stores 2 items of any given type (Pair) and one that stores 3 items of any given type (Triple). Then use the triple value class to store the win &loss records of multiple football teams (or any sport) in an array. Next loop through array and calculate the winning percentage of each team and add team name and win % to a pair class, and then add that instance to another array. Finally print out all team entries in the pair array with their win percentages and state which team has the greatest win percentage. b. This lab will involve the following new features: i Generics 2. DETAILS a. Generic classes: You'll make two classes similar to what we did in class. 1. One class is the Pair class just like from class, and the other will be a Triple class and will have one more parameter, so A,B,C in the Triple class. b. In your main class, you will create at least 5 instances of the Triple class, and in each one store: 1. Team name - String Wins -int il Losses -int c. Create an array of this Triple generic class type and store these 5 instances in the array, 1. Here is a guide on creating an array of generic types: Triple
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
