Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 5: overloading member functions. Overview: Your goal is to create an 'Array' class that is able to hold multiple integer values. The 'Array' class
Assignment 5: overloading member functions. Overview: Your goal is to create an 'Array' class that is able to hold multiple integer values. The 'Array' class will be given functionality through the use of various overloaded operators You will be given the main() function for your program and must add code in order to achieve the desired result. Do not change any code in main(). If something is not working, you must change your own code, not the code in main(). main() Below is your desired output: Specifications - The 'Array' class should have an overloaded constructor that accepts an integer argument which represents the size of the array. Use this size to create a dynamicallyallocated array of integers. - This means you will need at least two member variables for your class: a pointer to a dynamically-allocated array of integers and the size of the array - The equality operator (==) should return true if one Array object is an in-order subset of another Array object. For example, if a1 =[1,2] and a2=[1,2,3,4],a1==a2 should return true because a1 is contained in a2. - if a1 =[2,1] and a 2=[1,2,3,4], a1 == a 2 should return false. Even though a2 has all the elements of a1, they are not in the correct order - Notice that you are able to compare two Array objects with differently-sized arrays. Your code should not assume that one array will always be larger than the other. - The less-than operator (
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