Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ for this assignment Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth

Use C++ for this assignment

Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Use the included personType.h and personTypeImp.cpp files as well as the dateType.h and dateTypeImp.cpp files to complete the assignment.

  1. 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 initialize the member variables.

  1. Define a class extPersonType using the class personType, the class dateType, and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables.

  1. Define the class addressBookType using the previously defined classes. The program should perform the following operations:
  1. Provide the user a menu option with the ability to enter the personal information, the date of birth information and the address information. You will need to create an array of 10 addressBookType objects and write data to an object to the array as the user data in entered. The user should have the ability to use this menu option in the program to enter another object. You will need to keep track of the number of objects entered to make sure the user cannot enter more than 10 objects.
  2. Provide a menu option to search by name and print the address, phone number and date of birth if the name exists. Give an appropriate message if the name is not found.
  3. Provide a menu option to enter a month of the year and display the name, address, and phone number of the entries with birthdays in that month.
  4. Provide a menu option to enter the classification of a person (family, friend, or business) and display the name, address, and phone number of the entries with birthdays in that month.
  5. Provide a menu option to exit the program.
  • Make sure the user does not exceed the 10-max limit of addressBookType objects at any point during the program.

personType.h file

image text in transcribed

personTypeImp.cpp file

image text in transcribed

dateType.h file

image text in transcribed

dateTypeImp.cpp file

image text in transcribed

//personType.h #ifndef H_personType #define H_personType #include using namespace std; class personType { public: void print() const; //Function to output the first name and last name //in the form firstName lastName. void setName(string first, string last); //Function to set firstName and lastName according //to the parameters. //Postcondition: first Name = first; last Name last string getFirstName() const; // Function to return the first name. //Postcondition: The value of the firstName is returned. string getLastName() const; //Function to return the last name. //Postcondition: The value of the last Name is returned. personType(string first = "", string last = ""); //constructor //Sets firstName and lastName according to the parameters. 1/The default values of the parameters are empty strings. //Postcondition: firstName first; last Name last private: string firstName; //variable to store the first name string lastName; //variable to store the last name }; #endif //personTypeImp.cpp #include #include #include "personType.h" using namespace std; void personType: :print() const { cout #include "dateType.h" using namespace std; void dateType::setDate(int month, int day, int year) { dMonth = month; dDay = day; dYear = year; } int dateType::getDay() const { return dDay; } int dateType::getMonth() const { return dMonth; } int dateType::getYear() const { return dyear; } void dateType: :printDate() const { cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions