SSD8的exam3的答案

源代码在线查看: message.java

软件大小: 7 K
上传用户: kens
关键词: exam3 SSD8
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				/*
				 * 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;
					}
				}			

相关资源