I have just created the print_all method, rest all the code was in the question.
section 2.1 of this book:
http://opendatastructures.org/ods-java.pdf
que is this......already did part1 but struck at part2
part1. Use C# to implement the ArrayStack List class based on the methods of Section 2.1 (of all three versions of the book).
Your implementation, however, must differ from the one in the Java version of the book in the following ways:
Instead of the generic type, make the data specifically of type char [10 points]
Rename the global variable n to occupancy method "size()" to "Occupancy()" [10 points]
Add your own explanatory comment after each semicolon. The quality of these comments will affect your grade [15 points]
part2.
Phase 2 [50 points]
Create a Main() method that tests your implementation of the ArraStack List. You will need to design and implement a Print_all() method that prints List elements in square brackets (use underscore for empty array entries e.g. [b][r][e][d][_][_]).
The test must mimic the sequence of actions depicted in Figure 2.1 (of all three versions of the book). To reach the initial state, however, you must follow a sequence of actions like the one depicted below:
a <-- new array(6)
a[0] <-- 'b'
a[1] <-- 'r'
a[2] <-- 'e'
a[0] <-- 'd'
n <-- 4
a <-- new array(1)
n <-- 0
add(0, 'b')
add(1, 'r')
add(2, 'e')
resize()
add(3, 'e')
You may implement any of the procedures depicted below, or create your own valid one, that will result in an array of a backing array size 6 and the correct List elements in place.
Record another 40 - 60 seconds to present the result of your test starting from the status above. Use input statements to pause and control the run of the program.
Design and implement Print_all() [15 points]
Creating an appropriate initialization sequence in a correctly defined Main() method that com