Question: A. Write a public static method max0ccurrences that accepts a list of CalendarDatesas a parameter and returns the number of times the most frequent occurring

A. Write a public static method max0ccurrences that accepts a list of CalendarDatesas a parameter and returns the number of times the most frequent occurring date (the "mode") occurs in the list. Solve this problem using a Map as auxiliary storage. If the list is empty, return O (Hint: part A is basically what you did for the homework exercises, so done in just minutes?) (Hint2: part B is NOT in exercises, and l'm checking to see you practiced using iterators?) B. Write a public static method maxUsingIterator that accepts a list of CalendarDates and returns the maximum date as defined by compareTo. The empty list returns default zero date of Unix epoch zero 1/1/1970. You MUST use an iterator and.next to loop over the list (e.g. p.721 in text) Examples shown below Some starter code import java.util.* // starter code: public class Quiz11 public static void main(Stringl] args) ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
