Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using classes, develop an address book to keep track of the matric numbers, name

ID: 3660240 • Letter: U

Question

Using classes, develop an address book to keep track of the matric numbers, names, addresses, phone numbers, genders, races, religions, and dates of birth of classmates. Your program should be able to handle a maximum of 300 entries. a. Define a class addressType, that can store a street address, city, state and zip code. Use the appropriate functions to print and store the address. Also use constructors to automatically initialise the data members. b. Define a suitable class extPersonType using the class personType, the class dateType and the class addressType. Add data members to this class to include the gender, matric number, race and religion. Also, add a data member to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialise the data members. c. Derive the class addressBookType from the class arrayListType, so that an object of type addressBookType can store objects of type extPersonType. An object of type addressBookType should be able to process a maximum of 300 entries. Add necessary operations to the class addressBookType so that the program should perform the following operations. i. Load the data into the address book from a file. ii. Search for a person by the matric number. iii. Print the details of a given person. iv. Print the matric numbers, names, and date of birth of the people whose birthdays are in a given month or between two given dates. v. Print the names of all the people with the same status, such as gender, race, and state. Thank you in advance!

Explanation / Answer

#include #include #include #include #include #include using namespace std; struct Person { string name; string addr; string phone; string email; }; const int MAX_SIZE = 8; // max number of contacts // functin prototypes void addData(Person list[], int& size); void dispData(const Person list[], int size); void delData (const Person list[], int size); void saveFile(const Person list[], int size); void openFile(Person list[], int& size); char getMenuResponse(); int main(int argc, char *argv[]) { Person contactList[MAX_SIZE]; int numOfRecs = 0; bool run = true; do { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote