Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements an account with the username, password, and user email data.
- */
- package login;
- import login.*;
- public class Account
- {
- protected String login, password, email;
- /**
- * Constructs an Account object with the given data.
- * @param login The username associated to the account.
- * @param password The password associated to the account.
- * @param email The email associated to the account.
- */
- public Account(String login, String password, String email)
- {
- this.login = login;
- this.password = password;
- this.email = email;
- }
- /**
- * Returns the username.
- * @return The username associated to the account.
- */
- public String getLogin()
- {
- return login;
- }
- /**
- * Returns the password.
- * @return The password associated to the account.
- */
- public String getPassword()
- {
- return password;
- }
- /**
- * Returns the email.
- * @return The email associated to the account.
- */
- public String getEmail()
- {
- return email;
- }
- /**
- * Returns a string representing the given username.
- * @return The string representing the given username.
- */
- public String toString()
- {
- return login + ";" + password + ";" + email;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement