Question
Please help with C++ code. Please help me to get a head start on writing code for the required public functions in UnorderedArrayList.h and OrderedArrayList.h.
Please help with C++ code. Please help me to get a head start on writing code for the required public functions in UnorderedArrayList.h and OrderedArrayList.h. Do not add any public methods to the implementations.
For this ADT, removal operations. always return the object in the queue of highest priority that has been in the queue the longest. That is, no object of a given priority is ever removed as long as the queue contains one or more object of a higher priority. Within a given priority First-In-First-Out (FIFO) order must be preserved. By convention, a lower number=higher priority. If there are five priorities for a given object, 1 .. 5, then 1 is the highest priority, and 5 the lowest priority.
UnorderedArrayList.h and OrderedArrayList.h are prototype classes and are subclasses of the pure virtual AbstractList class defined in its header file. I need help with coding required public functions in in UnorderedArrayList.h and OrderedArrayList.h. Do not add any public methods to the implementations. Thank you.
//OrderedArrayList.h// \#ifndef ORD_ARRLIST_H \#define ORD_ARRLIST_H \#include "AbstractList.h" class OrderedArrayList : public AbstractList \{ private: int* array; int capacity; int currentPos; public: OrderedArrayList(); OrderedArrayList(int initialCapacity); virtual bool add(int data); virtual bool add(int index; int data); \#irtual void clear(); \#endif //UnorderedArrayList.h// \#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); 3; virtual bool add(int data); virtual bool add(int index, int data); virtual void clear(); virtual bool contains(int data)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started