title: How to use the hashmap in DataModel
body: <p>I am newbie to Android and I am working in an Android project. I want to implement a data model, using that model I want to perform the arithmetic operations using the Hash Map.</p>
  
  <p>But I don't know how to implement it. And also I want to print the value in Text View. The project is like an Calculator.</p>
  
  <h2>ModelActivity</h2>
  
  <p>Create the getter and setter I don't know how to implement this</p>
  
  <h2>MainActivity</h2>
  
  <p>Using that Model I have to perform the operation like getting and setting the value using the Hash map.</p>
  
  <p>This is my model class</p>
  
  <pre><code>public class Model {
  
      public Map&lt;String, String&gt; getSmap(String string, String str) {
          return Smap;
      }
  
      public Map&lt;Integer, Integer&gt; getImap() {
          return Imap;
      }
  
      public Map&lt;String, Integer&gt; getSImap() {
          return SImap;
      }
  
      public Map&lt;Integer, String&gt; getISmap(String jeeva, String s) {
          return ISmap;
      }
  
      private Map&lt;String, String&gt; Smap = new HashMap&lt;&gt;();
      private Map&lt;Integer, Integer&gt; Imap = new HashMap();
  
      private Map&lt;String, Integer&gt; SImap = new HashMap&lt;&gt;();
      private Map&lt;Integer, String&gt; ISmap = new HashMap&lt;&gt;();
  
      public Map&lt;Integer, String&gt; getISmap(String jeeva) {
  
          return ISmap;
      }
  }
  </code></pre>
  
  <p>Using that model I want to perform the operations like add sub.</p>