package com.codegym.task.task08.task0816; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; /* 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("st", df.parse("JUNE 7 1980")); map.put("tallone", df.parse("JULY 8 1980")); map.put("Stllone", df.parse("AUGUST 11 1980")); map.put("Stalone", df.parse("MEI 10 1980")); map.put("Stallne", df.parse("SEPTEMBER 21 1980")); map.put("Stalloe", df.parse("JANUARY 18 1980")); map.put("Stallon", df.parse("JULY 19 1980")); map.put("tallone", df.parse("APRIL 11 1980")); map.put("Stall", df.parse("JUNE 19 1980")); return map; } public static void removeAllSummerPeople(HashMap<String, Date> map) { //write your code here for(Map.Entry<String,Date> test:map.entrySet()) {Date a=test.getValue(); if(a.getMonth>5 && a.getMonth<9){map.remove(test.getKey()) ;} } } public static void main(String[] args) { // removeAllSummerPeople(createMap()) ; } }