Question: Need Help in Main In the class Main, (a) create a void method that when passed an array of green bean class type, outputs the
Need Help in Main



In the class Main, (a) create a void method that when passed an array of green bean class type, outputs the information about each green bean object referenced by the elements of the array passed to the method. If an element of the array has the value null, nothing is output for that element. (b) Create a method that when passed an array of green bean class type, returns the average length of the pods of the beans referenced by the elements in the array. Be sure to not count or try to get data from the elements or the array that have the value null. (c) Create a method that when passed an array of green bean class type, returns the average number of seeds in the pods of the beans referenced by the elements in the array. Be sure to not count or try to get data from the elements or the array that have the value null. 4. In method main of class Main, (a) create an array of your green bean class type that can hold 10 elements of green bean class type, then assign a unique object of green bean class type to 7 of the elements, each object of a different variety. Some green bean varieties are string bean, filet beans, long beans, purple string beans, flat beans wax beans and bush beans. i. ii. null to the remaining elements with the proviso that null cannot be assigned to adjoining (neighboring) elements. (b) Call the three methods created in step #3, passing each the array create above and output the values returned from the non-void methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
