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

📄 mystack.java

📁 简单的停车场管理程序,运用了队列与栈来进行车辆存储与停车管理计费
💻 JAVA
字号:
import java.io.*;
public class myStack extends LinkList

{
	private LinkList theStack;
	public myStack()
	{
	this.theStack=new LinkList();
	}
	


	
	//获取栈的长度
	public  int getStackLength() 
{
	return  theStack.getseqListLength();
}
//判断栈是否weikong
public boolean  isEmpty()


{
	if (theStack.getseqListLength()==0)
	{
		return true;
	}
		else 
			return false;
	
}
//入栈操作
public void push(LinkNode value)
	{
       theStack.InsertElement(1,0,value);
}
//出栈操作
public void pop()
{

theStack.DeleteElement(1,1);

}
//查找栈顶元素
public LinkNode getTopOfStack()
{
	return theStack.firstNode;
}

}



		
	

⌨️ 快捷键说明

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