Question: C++ CODE Lab-Homework Write a class program that can store data items of any data type (int, float, char, string, and double) in an array
C++ CODE
Lab-Homework Write a class program that can store data items of any data type (int, float, char, string, and double) in an array container within a class. That is one class, one private member array container (any other data member data) and member functions based on the data type. Your program must be able to pass the type of the elements into the array container using a function in the class from the main(), and print content. All operations (e.g., function to add elements and display/print) must be member functions in the class. You will create an object for each of the data types (e.g., intObject, floatObject, etc.); store/add at least 5 elements of each data types in the container using a member function and list the content (use the display/print function to list content) .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
