Create a class called Array for performing a float one dimensional array. Define all the necessary variables to represent the private part. Provide a constructor that enables an object of this class to be initialized when it's declared. The constructor should contain default size in case no initializers are provided which is 10. Provide a proper destructor. Provide public methods that perform each of the following tasks: Set the array values (Set). This function sets the array elements with a specific location. Get the array values (Get). This function returns the array element with a specific location. Function called Max to get the maximum element of the array. Write a program to test your class. Define an object (array) with size 20 and another object with the default value. Fill the two arrays with values. Find the maximum number of the first array.
Create a class called Array for performing a float one dimensional array. Define all the necessary variables to represent the private part. Provide a constructor that enables an object of this class to be initialized when it's declared. The constructor should contain default size in case no initializers are provided which is 10. Provide a proper destructor. Provide public methods that perform each of the following tasks: Set the array values (Set). This function sets the array elements with a specific location. Get the array values (Get). This function returns the array element with a specific location. Function called Max to get the maximum element of the array. Write a program to test your class. Define an object (array) with size 20 and another object with the default value. Fill the two arrays with values. Find the maximum number of the first array.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps