TESTS FOR ARRAY BASED LINKED LIST: Script started on Sun 07 Oct 2001 02:07:30 AM HST uhunix2:/home/27/ztomasze/java% java2 TestList **** List Interface Tester **** All arguments are integers; can be any token, for example: command: a 1 poi command: a 1 papayas command: a 3 bananas command: r 2 ------------------------------- a - add string at g - get the string at the position indicated r - delete the string at s - get size of this vector or report empty if size = 0 e, x, empty line - exit command: a 1 B 1: B command: a 2 C 1: B 2: C command: a 1 A 1: A 2: B 3: C command: a 2 D 1: A 2: D 3: B 4: C command: g 4 4 has C 1: A 2: D 3: B 4: C command: g 1 1 has A 1: A 2: D 3: B 4: C command: g 5 Position 5 is invalid (out of range) 1: A 2: D 3: B 4: C command: r 6 Position 6 is invalid (out of range) 1: A 2: D 3: B 4: C command: r a 1 1: D 2: B 3: C command: r 2 1: D 2: C command: r 2 1: D command: r 1 The list is empty. command: a 2 B Position 2 is invalid (out of range) The list is empty. command: a a 1 stillWorks 1: stillWorks command: a s 1 things are on the list. 1: stillWorks command: r 1 The list is empty. command: d e The list is empty. uhunix2:/home/27/ztomasze/java% ^D script done on Sun 07 Oct 2001 02:09:53 AM HST TESTS FOR DOUBLY LINKED LIST/EDITABLE TURING TAPE: Script started on Sun 07 Oct 2001 01:58:02 AM HST uhunix2:/home/27/ztomasze/java% java2 TestTuringMachine ------------------------------- Sum of first N numbers (n > 0): Enter an Integer: 12 Computing sum of first 12 numbers ... CORRECT answer of 78 ------------------ Making Palindromes Enter a character or empty input to exit: n nn Enter a character or empty input to exit: a naan Enter a character or empty input to exit: m namman Enter a character or empty input to exit: e nameeman Enter a character or empty input to exit: n namenneman Enter a character or empty input to exit: o namenooneman Enter a character or empty input to exit: nameno oneman Enter a character or empty input to exit: uhunix2:/home/27/ztomasze/java% ^D script done on Sun 07 Oct 2001 01:58:55 AM HST