⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customer.java

📁 排队论模拟,最近刚刚找到的
💻 JAVA
字号:
/*
**********************************************************************************************************************
	Wal-Mart Checkout Simulation
	By: Dustin Grimmeissen and Richard Anderson

	-> Customer Class

	This class stores information for each customer that is generated by the simulation program.
**********************************************************************************************************************
*/

public class Customer
{
	private long ArrivalTime;
	private long ServiceStartTime;
	private long DepartureTime;
	private int Lane;
	public Customer NextInLine;

	// Constructor
	public Customer( long Time )
	{
		ArrivalTime = Time;
		NextInLine = null;
	}

	// Customer has entered a server
	public void BeginService( long Time )
	{
		ServiceStartTime = Time;
	}

	// Customer has departed
	public void EndService( long Time )
	{
		DepartureTime = Time;
	}

	public long getArrivalTime()
	{
		return ArrivalTime;
	}

	public long getServiceStartTime()
	{
		return ServiceStartTime;
	}

	public long getDepartureTime()
	{
		return DepartureTime;
	}

	// Set the checkout lane a customer goes to
	public void setLane( int theLane )
	{
		Lane = theLane;
	}

	public int getLane()
	{
		return Lane;
	}
}

⌨️ 快捷键说明

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