Question: Department of Computer Science CSIS287 - Data Structure Lab Lab V - Dynamic Array List Objectives: Write a dynamic array list Change typedef to let

 Department of Computer Science CSIS287 - Data Structure Lab Lab V

Department of Computer Science CSIS287 - Data Structure Lab Lab V - Dynamic Array List Objectives: Write a dynamic array list Change typedef to let the list be an array list of Rational . Add the needed overloading operators Define a typedef ElementType as Rational 1. Define a class ArrayList containing data members A one-dimensional dynamic array of type ElementType. . An integer size that represents the number of the filed elements in the array, An integer capacity that represents the physical capacity of the dynamic array Implement the following functions: A constructor with capacity with default vatus 5. - A copy constructor that instantiates a new ArrayList object similar to the parameter. A destructor Method IsEmpty that tests the list is empty or not Method is Full that tests if the ist is full or not Method search that returns the index of the first occurrence of an item in the list Method inserttend that takes a data and insert the data at the end of the list. I the list is full you have to double is capacity and do the insertion Method removeFirstOccurence Ofitem that removes the first occurrence of its parametern In is not found in the list the method should return false, otherwise retums true. The program should stop if the method is called with an empty ist. Overload operator

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!