Could please someone give me a hand? I am not sure how to pass the last requirement.
Thanks a lot!
package com.codegym.task.task08.task0816;
import javax.swing.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/*
Kind Emma and the summer holidays
*/
public class Solution {
public static HashMap<String, Date> createMap() throws ParseException {
DateFormat df = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
HashMap<String, Date> map = new HashMap<String, Date>();
map.put("Stallone", df.parse("JUNE 1 1980"));
//write your code here
map.put("Stallone2", df.parse("JUNE 20 1980"));
map.put("Stallone3", df.parse("MAY 12 1980"));
map.put("Stallone4", df.parse("APRIL 14 1980"));
map.put("Stallone5", df.parse("JANUARY 30 1980"));
map.put("Stallone6", df.parse("JULY 11 1980"));
map.put("Stallone7", df.parse("FEBRUARY 10 1980"));
map.put("Stallone8", df.parse("SEPTEMBER 11 1980"));
map.put("Stallone9", df.parse("DECEMBER 15 1980"));
map.put("Stalone10", df.parse("JUNE 1 1980"));
return map;
}
public static void removeAllSummerPeople(HashMap<String, Calendar> map) {
//write your code here
for (Map.Entry<String, Calendar> iterate : map.entrySet()) {
if (iterate.getValue().equals(Calendar.JUNE)) {
map.remove(iterate.getKey());
}
if (iterate.getValue().equals(Calendar.JULY)) {
map.remove(iterate.getKey());
}
if (iterate.getValue().equals(Calendar.AUGUST)) {
map.remove(iterate.getKey());
}
}
}
public static void main (String[] args){
}
}