Question: Q 3 ) [ 4 marks ] Write a non - member function named TrimAfter that takes an arrayListType object by reference and an index

Q3)[4 marks] Write a non-member function named TrimAfter that takes an arrayListType object by reference and an index trimpoint. The function removes all the items in the list after the index trimpoint.
For example, if the list L contains the elements ,15,16] and you call the TrimAfter (L,3), the list content should become:
11,12,13
Notice that the size of the list after TrimAfter(L, trimpoint) is trimpoint. So, when trimpoint =0 then the list becomes empty.
For your convenience, the arrayListType class declaration is provided on the right.
Do all the required error checking.
 Q3)[4 marks] Write a non-member function named TrimAfter that takes an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!