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

📄 liststack.java

📁 简单的停车场管理程序,运用了队列与栈来进行车辆存储与停车管理计费
💻 JAVA
字号:
package com.he.java;
import java.io.*;
import com.he.java.*;
public class ListStack
{
	private LinkList theStack;
	public ListStack() 
	{
		this.theStack =new LinkList();
	}
	public int getStackLength()
	{
		return theStack.getLength();
	}
	public boolean isEmpty()
	{
		if (theStack.getLength()==0)	
			return true;
		else
			return false;
	}
	public void push(Object x)
	{ 
		ListNode n = new ListNode(x,null);
		
		theStack.Insert(0,n);
	}
	public void pop()
	{
		theStack.Delete(1);
	}
	public Object top()
	{
		return theStack.Header.next.element;
	}
	public int getLength()
	{
		return theStack.getLength();
	}


}

⌨️ 快捷键说明

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