Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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).

image text in transcribed

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

image text in transcribed

image text in transcribed

image text in transcribed

Errors below:

image text in transcribed

image text in transcribed

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

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

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago