title: 2 identical classes in Java
body: <p>Hi!</p>
  
  <p><p>I have a small design problem in my current project. I have a class that holds the information about the time a Customer was in a Shop.<p></p>
  
  <pre><code>public class Customer {
      private String enterTime;
      private String leaveTime;
  
      public void enterTimeToInt {
          Integer.parseInt(enterTime);
      } 
  
      public void leaveTimeToInt {
          Integer.parseInt(leaveTime);
      } 
  }
  </code></pre>
  
  <p>Now, in my program, i came across a situation where i had to make sure if there was any customer in the shop at a given time. Now, what i did was that i made another instance of the Customer class, which represented the given time and then checked if it matches any "real" Customer. But the problem is though, that i made a customer object representing time in a more abstract sense, not a customer.</p>
  
  <p>What should i do in this case? I need exactly the same methods and variables as the Customer class has, but i don't think it is a good design choice to just make a Customer class that represents random time, not a specific customer's time.</p>
  
  <p>Thank you very much!</p>