Menu

[Solved]Design Class Array Floating Point Numbers Constructor Accept Integer Argument Dynamically Q37201866

Design a class that has an array of floating point numbers. The constructor should accept an integer argument and dynamicallyDesign a class that has an array of floating point numbers. The constructor should accept an integer argument and dynamically allocate the array to hold that many numbers. The destructor should free the memory held by the array. In addition there should be member functions that perform the following Store a number in any element of the array Retrieve a number from any element of the array Return the highest value stored Return the lowest value stored Return the average value of the numbers stored Sample output How many numbers do you want to store? 5 Enter the 5 numbers: Number 0: 56 Number 1: 13 Number 2: 99 Number 3: 47 Number 4: 23 Here are the values you entered: Number 0: 56 Number 1: 13 Number 2: 99 Number 3: 47 Number 4: 23 The average of those values is 47.6 The highest number is 99 The lowest number is 13 Which cell do you want to retrieve the value from: Cell number: 2 Cell number 2 contains: 99 Which cell do you want to modify the value: Cell number: 3 Cell number 3 new contents will be: 130 Which cell do you want to retrieve the value from: Cell number: 3 Cell number 3 contains: 130 10:07 Notes Need this done in C++ Show transcribed image text Design a class that has an array of floating point numbers. The constructor should accept an integer argument and dynamically allocate the array to hold that many numbers. The destructor should free the memory held by the array. In addition there should be member functions that perform the following Store a number in any element of the array Retrieve a number from any element of the array Return the highest value stored Return the lowest value stored Return the average value of the numbers stored Sample output How many numbers do you want to store? 5 Enter the 5 numbers: Number 0: 56 Number 1: 13 Number 2: 99 Number 3: 47 Number 4: 23 Here are the values you entered: Number 0: 56 Number 1: 13 Number 2: 99 Number 3: 47 Number 4: 23 The average of those values is 47.6 The highest number is 99 The lowest number is 13 Which cell do you want to retrieve the value from: Cell number: 2 Cell number 2 contains: 99 Which cell do you want to modify the value: Cell number: 3 Cell number 3 new contents will be: 130 Which cell do you want to retrieve the value from: Cell number: 3 Cell number 3 contains: 130 10:07 Notes Need this done in C++

Expert Answer


Answer to Design a class that has an array of floating point numbers. The constructor should accept an integer argument and dynami… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *