DQ1 (for edition 7):
Compile and run the ArrayWriter, SimpleArray and SharedArrayTest examples in
the textbook Figure 23.8, Figure 23.9 and Figure 23.10, modify them to write
letters (i. e. a,b,c,d,e,f,g, …) to the array instead of numbers. Please
discussion the differences between the SimpleArray class in Figure 23.10 and
the SimpleArray class in Figure 23.7.
DQ1 (for edition 8):
Compile and run the ArrayWriter, SimpleArray and SharedArrayTest examples in
the textbook Figure 26.8, Figure 26.9 and Figure 26.10, modify them to write
letters (i. e. a,b,c,d,e,f,g, …) to the array instead of numbers. Please
discussion the differences between the SimpleArray class in Figure 26.10 and
the SimpleArray class in Figure 26.7.
And see attached files
Trial1/Fig23_07-09/ArrayWriter.class
Trial1/Fig23_07-09/ArrayWriter.java // Fig. 23.8: ArrayWriter.java
// Adds integers to an array shared with other Runnables
import java.lang.Runnable;
public class ArrayWriter implements Runnable
{
private final SimpleArray sharedSimpleArray;
private final int startValue;
public ArrayWriter( int value, SimpleArray array )
{
startValue = value;
sharedSimpleArray= array;
} // end constructor
public void run()
{
for ( int i = startValue; i





