Question: C++ inheritance and polymorphism 1- Implement an abstract class Arrays that has the following pure virtual functions typel), that returns the type of the array

C++ inheritance and polymorphism

C++ inheritance and polymorphism 1- Implement an abstract class Arrays that hasthe following pure virtual functions typel), that returns the type of the

1- Implement an abstract class Arrays that has the following pure virtual functions typel), that returns the type of the array (1-dimensional or 2-dimensional). i) sie0, that returns the number of elements in the array (e.g. (4,6) if we have a 2 dimensional array of size 4 by 6). Part A Implement the subclass onebimension for one-dimensional arrays. It must have one data member: a pointer to an array of integers Besides implementing the methods typel) and size() defined in the base class, you have to write code for the following functions a- A constructor that takes zero or one parameter (i.e. the length of the array The default size may be set to 5) b- A destructor that simply deletes the array C-number0Elements(): returns the number of elements stored so far in the array d- Insert): method to add an element into the array in case it is not full e- Search0): method to search for an element and returns the position of that element in case it was found f- Max): returns the maximum value in the array

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!