please help me
package com.codegym.task.task08.task0815;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
/*
Census
*/
public class Solution {
public static HashMap<String, String> createMap() {
//write your code here
HashMap<String, String> names = new HashMap<String,String>();
names.put("haokip1", "stephen");
names.put("haokip2", "stephen1");
names.put("haokip", "stephen");
names.put("haokip4", "stephen3");
names.put("haokip5", "stephen4");
names.put("haokip", "stephen5");
names.put("haokip7", "stephen");
names.put("haokip", "stephen7");
names.put("haokip9", "stephen8");
names.put("haokip0", "stephen");
return names;
}
public static int getSameFirstNameCount(HashMap<String, String> map, String name) {
//write your code here
int count = 0;
for(Map.Entry<String, String> pairs : map.entrySet()){
String value = pairs.getValue();
if(value.equals(name)){
count++;
}
}
return count;
}
public static int getSameLastNameCount(HashMap<String, String> map, String lastName) {
//write your code here
int count = 0;
for(Map.Entry<String, String> pairs : map.entrySet()){
String key = pairs.getKey();
if(key.equals(lastName)){
count++;
}
}
return count;
}
public static void main(String[] args) {
}
}