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.
109 lines (92 sloc)
2.53 KB
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
/********************************************* | |
* Class: User | |
* Author: Gabriella Reggiano | |
* | |
* Revision Log: | |
* 02/26/2016 - start code | |
* 03/04/2016 - adding in this javadoc shit | |
* 03/25/2016 - getters and setters for contactList, and parties | |
* | |
********************************************/ | |
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; | |
/******************************************* | |
*User Constructor | |
******************************************/ | |
public User(String un, String pw) | |
{ | |
_username = un; | |
_password = pw; | |
} | |
/******************************************* | |
*Username getter | |
******************************************/ | |
public String getUsername() | |
{ | |
return _username; | |
} | |
/******************************************* | |
*Username setter | |
******************************************/ | |
public void setUsername(String newUn) | |
{ | |
_username = newUn; | |
} | |
/******************************************* | |
*Password setter, old password required | |
******************************************/ | |
public void setPassword(String oldPw, String newPw) | |
{ | |
if (oldPw.equals(_password)) | |
_password = newPw; | |
} | |
/******************************************* | |
*Contact getter | |
******************************************/ | |
public Contact[] getContactList() | |
{ | |
return _contactList; | |
} | |
/******************************************* | |
*Contact setter | |
******************************************/ | |
public void setContactList(Contact[] conList) | |
{ | |
_contactList = conList; | |
} | |
/******************************************* | |
*Current Party List getter | |
******************************************/ | |
public Party[] getCurrPartyList() | |
{ | |
return _currentParties; | |
} | |
/******************************************* | |
*Current Party List setter | |
******************************************/ | |
public void setCurrPartyList(Party[] parties) | |
{ | |
_currentParties = parties; | |
} | |
/******************************************* | |
*Past Party List getter | |
******************************************/ | |
public Party[] getPastPartyList() | |
{ | |
return _pastParties; | |
} | |
/******************************************* | |
*Past Party List setter | |
******************************************/ | |
public void setPastPartyList(Party[] parties) | |
{ | |
_pastParties = parties; | |
} | |
} |