will give thumbs up directly after recieving answer for this question.
- solve using C++ please
- Use "this" pointer in all member functions of class that takes one or more parameters
- please make sure all points are included
Question 1: Implement the following Directory as described below: Each Directory contains a number of entries; Implement class Directory with the following: 1. Three private data member: a int maxSize b. int current to track the current number of entries in the Directory. This attribute gets modified whenever an entry is inserted or removed from list. c. string *list a pointer a dynamic array of strings that represent the names of the contacts in the entries. 2. The following public member functions: Use this pointer in all member function of the class that take one or more parameters. a. Defaulted parameterized constructor that receive only one integer parameter for the maxSize data member.it set the current data member to zero, create and fill the list with "N/A". The Default value of maxSize is 10. b. Deep Copy Constructor. c. Directory: Deallocate the list. disEmptyO, a boolean function that returns true if current== 0. and false otherwise. c. isFull(), a boolean function that returns true if current == maxSize, and false otherwise. f. int find(string entry) returns the index of entry if found in list, otherwise returns -1. 9. void insert(string entryname:this function does the following: 1. Inserts entryname into the end of the list in the Directory, if both the Directory is not full and entryname does not exist in list. it. If entryname to be inserted is already in list, then print a message saying the entry won't be inserted because it already exists in list. iii. If entryname is not in list, but list is full, then print a suitable message to say that the insert operation failed n. void print Directory(): prints the names of the contacts in the entries currently in the Directory alongside their number (index). 1. Setter and getter for maxSize. 1. getter for current data member. k. float utilization() that calculates the percentage of used entries in a Directory. (hint: utilization is 100*current/maxSize). Make sure that the division is a floating-point division. 3. Define friend function void Erase(Directory& obj, int i); if the Directory is not empty and if the index (1) is between 0 and current-1, inclusive, it removes the ith entry from list in Directory and shifts remaining entries to left to fill the gap. Otherwise, it prints a message that indicate if the Directory is empty or the index (i) is out of range