Create the following class USING POINTERS/dereferences notation. class Array2_0 { private:  int * arr;  int size; public:  Array2_0(int size);//constructor  Populate(); //Populates the array by taking input from the user.  PrintArray(); //prints all the values in array  FindMax(); //Returns the max value in the array.  FindMin(); //Returns the min value in the array.  Find(int val); //Finds the val and returns true.  Replace(int val, int val2); //Finds the first occurrence of val in the array and replaces it with val2.  ReplaceAll(int val, int val2); //Finds all the occurrences of val in the array and replaces it with val2. }; Create an object of this class in main and call all functions.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

 Create the following class USING POINTERS/dereferences notation.

class Array2_0

{

private:

 int * arr;

 int size;

public:

 Array2_0(int size);//constructor

 Populate(); //Populates the array by taking input from the user.

 PrintArray(); //prints all the values in array

 FindMax(); //Returns the max value in the array.

 FindMin(); //Returns the min value in the array.

 Find(int val); //Finds the val and returns true.

 Replace(int val, int val2); //Finds the first occurrence of val in the array and replaces it with val2.

 ReplaceAll(int val, int val2); //Finds all the occurrences of val in the array and replaces it with val2.

};

Create an object of this class in main and call all functions.

 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,