Skip to content
Permalink
dab3e668ef
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
109 lines (92 sloc) 2.53 KB
/*********************************************
* 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;
}
}