Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Can anyone help me with this C++ problem regarding classes? * You MUST create a class header file, class source file and driver program in

Can anyone help me with this C++ problem regarding classes?

* You MUST create a class header file, class source file and driver program in order for this program to work!*

1) Make one class that contains an array of float number values.

- Your default constructor must be of a dynamic array consisting of 10 elements

- Your overloaded constructor needs to accept integer arguments and allocate the array dynamically so that it is able to store those numbers.

- You must include a destructor which must free the memory stored by your array.

- Also, there needs to be a set of member functions to execute performance to:

a.) Hold numbers in any element related to the array (Your declared function must take the index as an argument)

b.) Retrieve one number from any element of the array (Again, the function has to take the index as an argument)

c.) Return back the greatest value inside the array

d.) Return the smallest value inside the array

e.) Return the average of all the numbers within the array

f.) Finally, make a driver program that incorporates the class and be sure to test that every function performs correctly.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions