Select the best code to utilize generics so that the class i…

Select the best code to utilize generics so that the class implements the Comparable interface correctly. public class Unicorn implements 1  {    private int attack; /* valid constructor */ public int compareTo( 2 arg) {   /* valid implementation */ }}    1   :   2   :

   Protagonist myHero = new Hero();  Given the class hierarc…

   Protagonist myHero = new Hero();  Given the class hierarchy and code statement above, which of the following methods are allowed and are not allowed to be called on the myHero variable? superPower() : talk() : For each statement below, indicate which class provides the implementation of each of the methods called. myHero.save();     myHero.toString();

Student studentObj = new CSStudent(); Given the class hierar…

Student studentObj = new CSStudent(); Given the class hierarchy and code statement above, which of the following methods are allowed and are not allowed to be called on the studentObj variable? code() : eat() : For each statement below, indicate which class provides the implementation of each of the methods called. studentObj.study(); studentObj.toString();