Question: Create a list class named 'List'. Implement this class using a dynamic array. The initial size of the dynamic array is to be 2 .

Create a list class named 'List'. Implement this class using a dynamic array. The initial size of the dynamic array is to be 2. If the array is ever full when an insert operation is called, you are to add 2 to the size of the array.
Write a small main program to test your List class with the following menu:
Insert (value to be inserted is entered from keyboard)
Remove (value to be removed entered from keyboard, remove first occurrence if one exists and shift other items to the left so as to not leave a blank slot)
Print List (all values, one per line)
Quit
After you have everything working, derive a class named Set from List. A Set is like a List but does not allow duplicate values to be stored. Change the main program so that you ask the user at the beginning of the program if they want to use a List or a Set. Proceed with the mainfprogram as I outlined before with whichever type they choose.
Keep in mind the following:
Name your source files set.h, set.cpp, and main.cpp.
With invalid data, your program should respond appropriately.
Each function prototype should have a description, preconditions, and postconditions.
Test your code when you think you are finished. Try to break it. After you are done trying to break it, I will then try.
 Create a list class named 'List'. Implement this class using a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!