agenda.java

来自「采用面向对象方法和Java语言开发一个基于命令行交互方式的议程管理系统(agen」· Java 代码 · 共 55 行

JAVA
55
字号
package agenda;


public class Agenda {
	public String userName;
	public String password;
	public String otheruserName;
	public String startTime;
	public String endTime;
	public String title;
	
	//设置议程的发起者的用户帐号。
	public void SetUsername(String userName){
		this.userName = userName;
	}	
	  //设置议程的发起者的帐号密码。
	public void Setpassword(String password){
		this.password = password;
	}
	 //设置议程的预约者的用户帐号。
	public void SetOtheruserName(String otheruserName){
		this.otheruserName = otheruserName;
	}
	 //设置议程开始时间
	public void SetstartTime(String startTime){
		this.startTime = startTime;
	}
	 //设置议程结束时间
	public void SetendTime(String endTime){
		this.endTime = endTime;
	}
	//设置议程标签
	public void Settitle(String title){
		this.title = title;
	}
	 // 转化为字符串,返回字符串形式的议程信息
	public String toString(){
		Time_string stt = new Time_string();
		String s = new String();
		s += "会议标签: "+this.title;
		s += "\n";
		s += "会议发起用户: "+this.userName;
		s += "\n";
		s += "用户密码密码: "+this.password;
		s += "\n";
		s += "会议所预约用户: "+this.otheruserName;
		s += "\n";
		s += "会议开始时间: "+stt.Conserse(this.startTime);
		s += "\n";
		s += "会议结束时间: "+stt.Conserse(this.endTime);
		return s;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?