private Hut createHut( String name, String phone, String coordinates, String buildDate, String mapId, String picUrl, String capacity, String price) { ExpeditionMap map = manager.getExpeditionMap(Integer.parseInt(mapId)); Hut hut = null; try { hut = new Hut( name, phone, coordinates, new Date(new SimpleDateFormat("yyyy-MM-dd").parse(buildDate).getTime()), map, picUrl, Integer.parseInt(capacity), Double.parseDouble(price)); } catch (ParseException e) { e.printStackTrace(); } manager.addHut(hut); return hut; }