Using MVC Classes, design an Address Book ProgrammingAPPLICATION to keep track of the names, addresses, phone numbers, and dates of birth of Family members, close Friends, and certain Business associates. Your ProgrammingAPPLICATION should be able to handle any number of entries since you will design your own Binary Search Tree ADT data structure (you are not to use any STL data structures Classes using:
A C++ Class named XYBinarySearchTree, where X is the first letter of your Last Name and Y is the first letter of your First Name. Every member function in the interface must be preceded by XY.
A Class AddressType that can store a street address, city, state, and ZIP code. Use the appropriate methods to display (must use toString method) and save to a data file named Data.txt the street address, city, state, and Zip code. Use Constructors to automatically initialize the member variables that MUST be declared private. Appropriate accessor and mutator member functions for each private member variable must be created.
Define the Class PersonType that can store first name, last name. Use the appropriate member functions to display (must use toString method ) and save to a data file the first name and last name. Use Constructors to automatically initialize the member variables that MUST be declared private. Appropriate accessor and mutator member functions for each private member variable must be created.
Define the Class DateType that can store month, day, and year. Use the appropriate member functions to display (must use toString method) and save to a data file the month, day, and year. Use Constructors to automatically initialize the member variables that MUST be declared private. Appropriate accessor and mutator member functions for each private member variable must be created.
Derive the Class ExtPersonType using Class PersonType. Add a private member variable address of Class AddressType to this Class. Add a private member variable dob of Class dateType to this Class. Add a private member variable phoneNumber to store the phone number. Add a private member variable personStatus to this Class to classify the person as a family member, a friend, or business associate. Add (overwrite) the member functions to display (must use toString method and super C++ equivalent) and save to a data file the appropriate member variables. Use Constructors to automatically initialize the member variables (must use super C++ equivalent). Appropriate accessor and mutator member functions for each private member variable must be created. MUST use inheritance in creating these Classes).
Derive the Class AddressBook from the Class XYBinarySearchTree so that an object of the type AddressBook can store objects of the type ExtPersonType. Add any necessary operations to the Class AddressBook so that the program can perform the following operations:
Load the data into the address book (Binary Search Tree) from the disk file Data.txt.
Display the address book (Binary Search Tree) using the depth-first Traversal.
Display the address book (Binary Search Tree) using the breadth-first Traversal.
Display the address, phone number, and date of birth (if it exists) of a given person using Last Name.
Display the names of the people whose birthdays are in a given month.
Display the names of all the people having the same status, such as Family, Friend, or Business.
Add a new entry to the address book (Binary Search Tree).
Delete an entry from the address book (Binary Search Tree).
When the program terminates, Save the data in the address book (Binary Search Tree) to the same disk file Data.txt
Create a main.cpp that contains main.
These entries are initially read and added from the Data.txt and are also saved in same file when your ProgrammingAPPLICATION terminates.
Your ProgrammingAPPLICATION must read in the data file (FILE INPUT) into your Programming APPLICATION memory (please DO NOT read from File and write to File skipping reading into the program memory) You cannot use any DATA STRUCTURES STL Classes! One Class per .h & .cpp file! Must use MVC Design Pattern.
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.