Question
C++ Program Program Requirements: Create a class (to be named IntegerList) , to hold integers. Use dynamic memory allocation (smart pointers) for handling any number
C++ Program
Program Requirements:
Create a class (to be named IntegerList), to hold integers. Use dynamic memory allocation (smart pointers) for handling any number of integers at run-time (read the integers until a number greater than 3500 is entered).
The member data elements should be private with public member functions to handle the following operations:
Constructor:
with a pointer to an integer as parameter to initialize the class to contain a copy of the integer
Public Member functions:
Add function (AddtoList) to allow the adding an integer at the end of the list
Print function (PrintNum) to display the integers in the List on the standard output
Count function (CountNum) to return the number of integers stored in the list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started