代码拉取完成,页面将自动刷新
package wek3;
/* **
* Customer represents a waiting customer.
*
* @author Lewis and Chase
* @version 4.0
*/
public class Customer
{
private int arrivalTime, departureTime;
/**
* Creates a new customer with the specified arrival time.
* @param arrives the arrival time
*/
public Customer(int arrives)
{
arrivalTime = arrives;
departureTime = 0;
}
/**
* Returns the arrival time of this customer.
* @return the arrival time
*/
public int getArrivalTime()
{
return arrivalTime;
}
/**
* Sets the departure time for this customer.
* @param departs the departure time
**/
public void setDepartureTime(int departs)
{
departureTime = departs;
}
/**
* Returns the departure time of this customer.
* @return the departure time
*/
public int getDepartureTime()
{
return departureTime;
}
/**
* Computes and returns the total time spent by this customer.
* @return the total customer time
*/
public int totalTime()
{
return departureTime - arrivalTime;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。