Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PARAMETERS: An array and the number of elements in the array 1.Given an empty calling object, copy one or more elements of the array into

PARAMETERS: An array and the number of elements in the array

1.Given an empty calling object, copy one or more elements of the array into the calling object.

2.Given an empty calling object, copy in reverse one or more elements of the array into the calling object.

3.Given an empty calling object, copy specific elements (even, odds, multiples, etc.) of the array into the calling object.

4. Given an empty array, copy specific elements (even, odds, multiples, etc.) of the calling object into the array.

5. Given an empty array, copy in reverse one or more elements of the calling object into the array.

6. Given an empty array, copy specific elements (even, odds, multiples, etc.) of the calling object into the array.

7. Compare the elements of the calling object and the array and return true if they are the same (make sure to first check if the number of elements is the same, because there is no need to start a loop if the number of elements differs).

please help me with these problems for C++ thank you so much

and here is the .h file

#include #include

class Node { public: Node() : data(0), prev(nullptr), next(nullptr) {} Node(int theData, Node* prevLink, Node* nextLink) : data(theData), prev(prevLink), next(nextLink) {} int getData() const { return data; } Node* getPrev() const { return prev; } Node* getNext() const { return next; } void setData(int theData) { data = theData; } void setPrev(Node* prevLink) { prev = prevLink; } void setNext(Node* nextLink) { next = nextLink; } ~Node(){} private: int data; // To simplify, we are using only one piece of data. Node* prev; Node* next; };

class DoublyList { public: DoublyList() : first(nullptr), last(nullptr), count(0) {} ~DoublyList();

private: // Pointer to the first node on the list. Node *first; // Pointer to the last node on the list. Node *last; // Number of nodes in the list. int count; };

#endif

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

8. Measure the effectiveness of the succession planning process.

Answered: 1 week ago