Answer these questions in a text document and upload to Canvas. Answer with whatever programming language you'd like.


  1. What does the term element mean, in relation to an array?
  2. What does the term index mean, in relation to an array?
  3. Our Smart Fixed-Length Array has contiguous elements by design. What does this mean?
  4. What index do the Front functions (PushFront, PopFront, GetFront) operate on?
  5. What index do the Back functions (PushBack, PopBack, GetBack) operate on?
  6. What error checks are needed for the Get functions (GetFront, GetBack, GetAt)?
  7. What error checks are needed for the Push functions (PushFront, PushBack, PushAt)?
Push
Draw the "After" state for each of the following:

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PushBack( "X" );

Value:            
Index: 0 1 2 3 4 5

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PushFront( "X" );

Value:            
Index: 0 1 2 3 4 5

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PushAt( 2, "X" );

Value:            
Index: 0 1 2 3 4 5
Pop
Draw the "After" state for each of the following:

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PopBack();

Value:            
Index: 0 1 2 3 4 5

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PopFront();

Value:            
Index: 0 1 2 3 4 5

Original array

Value: "C" "A" "T" "S" "" ""
Index: 0 1 2 3 4 5

After PopAt( 2 );

Value:            
Index: 0 1 2 3 4 5

Author: Rachel Wil Sha Singh

Created: 2023-09-27 Wed 15:11

Validate