eliminato classi superflue del progetto e risolto qualche bug. c'è ancora del lavoro da fare sulla queue e deque
This commit is contained in:
45
com/xgiovio/ArrayTest.java
Normal file
45
com/xgiovio/ArrayTest.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.xgiovio;
|
||||
|
||||
import general_utility.test_object;
|
||||
import stack.ArrayStack;
|
||||
import stack.FixedArrayStack;
|
||||
import stack.NodeStack;
|
||||
|
||||
/**
|
||||
* Created with xgiovio.macbookair.
|
||||
* User: xgiovio
|
||||
* Date: 23/03/14
|
||||
* Time: 20:37
|
||||
*/
|
||||
public class ArrayTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
NodeStack<test_object> a = new NodeStack<test_object>();
|
||||
a.push(new test_object(10));
|
||||
a.push(new test_object(20));
|
||||
a.push(new test_object(30));
|
||||
a.push(new test_object(40));
|
||||
|
||||
|
||||
|
||||
a.pop();
|
||||
a.pop();
|
||||
|
||||
|
||||
System.out.print(a.toString());
|
||||
|
||||
a.push(new test_object(50));
|
||||
a.push(new test_object(60));
|
||||
|
||||
System.out.print(a.toString());
|
||||
a.pop();
|
||||
System.out.print(a.toString());
|
||||
System.out.print(a.top().toString());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user