From 703465f268a32d764fffe1a3f1dc87df46548c49 Mon Sep 17 00:00:00 2001 From: rikeroleg Date: Mon, 27 Nov 2017 10:04:35 -0500 Subject: [PATCH] commit --- src/main/java/io/zipcoder/Problem1.java | 31 +++++++++++++++++++++ src/test/java/io/zipcoder/Problem1Test.java | 15 ++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/main/java/io/zipcoder/Problem1.java b/src/main/java/io/zipcoder/Problem1.java index 6cd6024..c48afb3 100644 --- a/src/main/java/io/zipcoder/Problem1.java +++ b/src/main/java/io/zipcoder/Problem1.java @@ -1,4 +1,35 @@ package io.zipcoder; +import java.util.HashMap; + public class Problem1 { + + // map { ‘f’ : ‘7’, ‘s’:’$’, ‘1’:’!’, ‘a’.:’@’} + // Input = “The Farmer went to the store to get 1 dollar’s worth of fertilizer” + //Output = “The 7@rmer went to the $tore to get ! doll@r’$ worth of 7ertilizer” + + public static void main(String[] args) { + + HashMap mapKeyValue = new HashMap(); + mapKeyValue.put("f", "7"); + mapKeyValue.put("s", "$"); + mapKeyValue.put("1","!"); + mapKeyValue.put("a", "@"); + + + + } + + + + public static String iterationMethod(){ + String value = ""; + value = value.replaceAll("f", "7"); + // for (HashMap map: ) + if (value.matches("f")) + value = "7"; + return value; + } + + } diff --git a/src/test/java/io/zipcoder/Problem1Test.java b/src/test/java/io/zipcoder/Problem1Test.java index de82e99..6487885 100644 --- a/src/test/java/io/zipcoder/Problem1Test.java +++ b/src/test/java/io/zipcoder/Problem1Test.java @@ -1,4 +1,19 @@ package io.zipcoder; +import org.junit.Test; + public class Problem1Test { + String input = "The Farmer went to the store to get 1 dollar’s worth of fertilizer”; + + @Test + public void iterationMethodTest(){ + String expected = ; + String actual = ; + } + + @Test + public void secondMethodName(){ + + } + }