Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 4 Question: Create an Array class according to the UML. UML: - data: int * - size: int + Constructor: constructor with parameters +

Lab 4
Question: Create an Array class according to the UML.
UML:
-data: int*
-size: int
+Constructor: constructor with parameters
+Copy constructor:
+Destructor:
Then, create a new class: ArrayNew. Use unique pointer to replay the raw pointer you used before.
TA explanation:
You need to create 4 files. 2 files for .h and 2 for .cpp (.h and .cpp for Array and .h and .cpp for ArrayNew).You need to use a normal pointer in the Array class and a unique pointer for ArrayNew class. Dont connect the array class and ArrayNew class. Both are separate and have different pointers. (Array class has normal raw pointer and ArrayNew class has unique pointer ).You need to define a parametrized constructor, copy constructor and a destructor.
Despite all the instructions, I still have no idea what to do and what they are asking for. The TA said to use a for loop to iterate through the array. That, however is about all I understand. Please help me understand this and walk me through what to do. Including code is extremely helpful (as long as I understand it).

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

In Exercises solve for x or b. (a) log 3 1/81 = X (b) log 6 36 = x

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago