Question: Please help me with these ERRORS in this C++ code. UnorderedArrayList.h, is where the declaration of public functions. from the header file (header file not
Please help me with these "ERRORS" in this C++ code.
UnorderedArrayList.h, is where the declaration of public functions. from the header file (header file not posted here).

UorderedArrayList.cpp, is the definition of public functions from UnorderedArrayList.h. I have errors here.



Errors below:


I'm not supposed to add/modify any public methods from UnorderedArrayList.h, but how do I fix these errors without losing the idea of this code. Please provide explanation so I will learn. Thank you.
\#ifndef UNORD_ARRLIST_H \#define UNORD_ARRLIST_H \#include "AbstractList.h" class UnorderedArrayList : public AbstractList private: int* array; int capacity; int currentPos; public: UnorderedArraylist(); UnorderedArrayList(int initialCapacity); virtual bool add(int data); virtual bool add(int index, int data); virtual void clear(); virtual bool contains(int data); virtual int get(int index); virtual int indexOf(int data); virtual bool isEmpty(); virtual int remove(int index); virtual bool removeAll(int data); virtual int size(); virtual void trimToSize() ; \}; \#endif Compilation failed due to following error(s). numElements UnorderedArrayList.cpp: At global scope: UnorderedArrayList. cpp:54:1: error: 'Object' does not name a type 54 | Object UnorderedArraylist: :remove() \{
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
