He would obtain a master’s degree from Iowa State University…

He would obtain a master’s degree from Iowa State University. He turned a life-long interest in plants into a scientific study. For 47 years, he taught at Tuskegee Institute in Alabama. He developed some 300 products that could be derived from peanuts and more than 100 from sweet potatoes and 75 more from pecans.

What will be printed out by the following code? Assume each…

What will be printed out by the following code? Assume each class is in its own source code file. 1   public class Test,{2     public static void main(String[],args) {3       ClassA[] list = {new ClassA(),,new ClassB(), new ClassC()};4       for (ClassA item :,list)5         System.out.println(item + “: ” + item.pay());6     } // end main7   } // end class Test89   public class ClassA,{10  public String pay() { return “monthly pay”;,}11  public String toString() { return “A”; }12  }1314  public class ClassB,extends ClassA {15    public String,toString() { return super.toString() + super.toString(); }16  }1718  public class ClassC extends,ClassB {19    public String pay() { return “1/10 bonus plus” + super.pay(); }20  }

What will be printed out by the following code? 1   List lis…

What will be printed out by the following code? 1   List list = new ArrayList();2   list.add(“A”);3   list.add(“B”);4   list.add(“C”);5   list.add(“D”);6   for (int i = 0; i< list.size(); i++) {7     list.remove(i);8     System.out.println(list);9   }