/*
* this is Message class which used to create users's messages.
* @author: Chen Yao
* @studentID:200532580247
* @date:6.10.2008
*/
import java.util.Date;
public class Message{
public String sendUser;//the user who send the message.
public String receiveUser;//the user who receive the message.
public String messageTexts;//the message context.
public Date date;// the date and time the message was left.
//the constructor of class Message.
public Message(String sender, String receiver, String message,Date d){
sendUser = sender;
receiveUser = receiver;
messageTexts = message;
date=d;
}
//set the sender's name.
public void setSend(String sendName){
sendUser = sendName;
}
//get the sender's name.
public String getSend(){
return sendUser;
}
//set the receiver's name.
public void setReceive(String receiverName){
receiveUser = receiverName;
}
//get the receiver's name
public String getReceive(){
return receiveUser;
}
//set the message context.
public void setMessageTexts(String information){
messageTexts = information;
}
//get the message context.
public String getMessageTexts(){
return messageTexts;
}
}