Question: Please help, Thanks. (20 pts) Write a method that takes an ArrayList Dogi, as the only parameter, and returns the total number of legs of

Please help, Thanks.
(20 pts) Write a method that takes an ArrayList Dogi, as the only parameter, and returns the total number of legs of all dogs. 20 pts) Write a method that takes an int array of any size as the only parameter, and returns the average of its contents.' 20 pts) Write a method that efficiently computes and prints the factorials of 0-9. Hint: you only need seven multiplication ops. (20 pts) Write a method that takes an int array and a single int pivot, and efficiently places all the numbers lower than the pivot at the start of the array, and the ones larger at the end (it partitions the array). Do not sort (because that would be inefficient - why?). Hint: start with an index at each end of the array, and move each index un t is on a number that is in the wrong location. When they are each on such a number, swap the numbers in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
