This commit is contained in:
2024-12-31 14:58:42 +03:00
parent db2dbc5c19
commit b050db6dce
16 changed files with 323 additions and 1 deletions

29
labs/lab7/ListTest.java Normal file
View File

@ -0,0 +1,29 @@
// ****************************************************************
// ListTest.java
//
// A simple test program that creates an IntList, puts some
// ints in it, and prints the list.
//
// ****************************************************************
public class ListTest
{
public static void main(String[] args)
{
IntList myList = new IntList(10);
myList.add(100);
myList.add(50);
myList.add(200);
myList.add(25);
System.out.println(myList);
IntList intList = new IntList(10);
intList.add(10);
intList.add(5);
intList.add(20);
intList.add(15);
// Print the unsorted list
System.out.println("IntList contents:");
System.out.println(intList);
}
}