加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ClassSchedule.java 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
炎渊 提交于 2020-04-25 01:35 . 上传作业
/**
A computer 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 computer class with title, days, time and room
*/
public ClassSchedule(String classTitle, String meetingDays, String aStartTime, String anEndTime, String classRoom)
{
title = classTitle;
days = meetingDays;
startTime = aStartTime;
endTime = anEndTime;
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;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化