Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE C++ THIS IS ONE QUESTION!!! READ! THE! INSTRUCTIONS!!! A, B, C and the roman numerals after C are all the steps that should be

USE C++

THIS IS ONE QUESTION!!! READ! THE! INSTRUCTIONS!!! A, B, C and the roman numerals after C are all the steps that should be taken to complete the assignment! I REPEAT! THIS IS ONE SINGLE QUESTION, DO NOT TRY AND COPY AND PASTE SOMEONE ELSE'S INCORRECT ANSWER TO THIS OR YOU WILL RECEIVE A THUMBS DOWN!

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.

Step 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.

Step 2. Create extPersonType as a derived class using personType as the base class, include the addressType class and the dateType class as a data member objects in the extPersonType class using Composition. 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.

Step 3. 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.

BELOW ARE THE INCLUDED FILES REQUIRED TO COMPLETE THIS ASSIGNMENT

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 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

Step: 3

blur-text-image

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

Finance The Role Of Data Analytics In Manda Due Diligence

Authors: Ps Publishing

1st Edition

B0CR6SKTQG, 979-8873324675

More Books

Students also viewed these Databases questions

Question

2. What is the business value of security and control?

Answered: 1 week ago