title: What appropriate way to create and use class ? (example inside)
body: <p>Now. I so confuse when use any classes. What is best practice approach to use them?</p>
  
  <p>Example
   I have a UserClass name User that have 2 attributes UserName and Password</p>
  
  <p>when I use I will create new object like this</p>
  
  <p>UserClass userObject = new UserClass();</p>
  
  <p>this is my question that I so confuse to use</p>
  
  <p>If i want to call Method name "Login" what is appropriate way to use them?</p>
  
  <p>Between
         1 Set Value to Attribute of Object Like this</p>
  
  <pre><code>      userObject.UserName = "user";
        userObject.Password = "password";
  
        if (userObject.Login())
        {
             //Do Something After Login
        }
        else
        {
             //Show Something when Error
        }
  
     2 Send Value as parameter
        if (userObject.Login("user","password"))
        {
             //Do Something After Login
        }
        else
        {
             //Show Something when Error
        }
  </code></pre>
  
  <p>From above
       <strong>What is appropriate approach to use and apply to any classes?</strong></p>
  
  <p>Thank you very much for your guidance _/\_</p>
  
  <p>P.S I practice to be better Programmer</p>