Advertisement
heavenriver

Account.java (path: ../login)

May 26th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. /**
  2.   * Implements an account with the username, password, and user email data.
  3.   */
  4.  
  5. package login;
  6. import login.*;
  7.  
  8. public class Account
  9.     {
  10.    
  11.     protected String login, password, email;
  12.    
  13.     /**
  14.       * Constructs an Account object with the given data.
  15.       * @param login The username associated to the account.
  16.       * @param password The password associated to the account.
  17.       * @param email The email associated to the account.
  18.       */
  19.    
  20.     public Account(String login, String password, String email)
  21.         {
  22.         this.login = login;
  23.         this.password = password;
  24.         this.email = email;
  25.         }
  26.    
  27.     /**
  28.       * Returns the username.
  29.       * @return The username associated to the account.
  30.       */
  31.    
  32.     public String getLogin()
  33.         {
  34.         return login;
  35.         }
  36.    
  37.     /**
  38.       * Returns the password.
  39.       * @return The password associated to the account.
  40.       */
  41.    
  42.     public String getPassword()
  43.         {
  44.         return password;
  45.         }
  46.    
  47.     /**
  48.       * Returns the email.
  49.       * @return The email associated to the account.
  50.       */
  51.    
  52.     public String getEmail()
  53.         {
  54.         return email;
  55.         }
  56.    
  57.     /**
  58.       * Returns a string representing the given username.
  59.       * @return The string representing the given username.
  60.       */
  61.    
  62.     public String toString()
  63.         {
  64.         return login + ";" + password + ";" + email;
  65.         }
  66.    
  67.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement