1 Star 0 Fork 0

炎渊/Objects Early

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ClassSchedule2.java 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
炎渊 提交于 2020-04-25 01:35 . 上传作业
/**
A class has a title, time and room
*/
public class ClassSchedule
{
private String title;
private String days;
private String startTime;
private String endTime;
private String room;
/**
Constructs a class with title, day, time and room.
*/
public ClassSchedule(String classTitle, String meetingDays, String aStartTime, String aEndTime, String classRoom)
{
title = classTitle;
days = meetingDays;
startTime = aStartTime;
endTime = aEndTime;
room = classRoom;
}
/**
Gets the title.
@return the title
*/
public String getTitle()
{
return title;
}
/**
Gets the time in the form "days start time-end time"
@return the time
*/
public String getTime()
{
String time = days + " " + startTime + "-" + endTime;
return time;
}
/**
Gets the room.
@return the room
*/
public String getRoom()
{
return room;
}
/**
Sets the days.
@param meetingDays the new meeting days
*/
public void setDays(String meetingDays)
{
days = meetingDays;
}
/**
Sets the start time.
@param aStartTime the new start time
*/
public void setStartTime(String aStartTime)
{
startTime = aStartTime;
}
/**
Sets the end time.
@param anEndTime the new end time
*/
public void setEndTime(String aEndTime)
{
endTime = aEndTime;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yan_yuan/Objects-Early.git
git@gitee.com:yan_yuan/Objects-Early.git
yan_yuan
Objects-Early
Objects Early
master

搜索帮助