Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

=+ How well do you think you could do your job?

Answered: 1 week ago