Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
PartyApp/Party_APP/src/model/User.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39 lines (32 sloc)
724 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package model; | |
public class User | |
{ | |
private String _username; | |
private String _password; | |
//once other classes made these errors should disappear | |
private Contact[] _contactList; | |
private Party[] _currentParties; | |
private Party[] _pastParties; | |
//Constructor | |
public User(String un, String pw) | |
{ | |
_username = un; | |
_password = pw; | |
} | |
//getter for username | |
public String getUsername() | |
{ | |
return _username; | |
} | |
//setter for username | |
public void setUsername(String newUn) | |
{ | |
_username = newUn; | |
} | |
//setter for password, asking for old password first | |
public void setPassword(String oldPw, String newPw) | |
{ | |
if (oldPw.equals(_password)) | |
_password = newPw; | |
} | |
} |