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

In this program you learn detail of muliple inheritance for developing a program

ID: 3915710 • Letter: I

Question

In this program you learn detail of muliple inheritance for developing a program. First consider the base class addressType as specified below. //class specification for address Type class addressType t public: addressType0: // Default constructor that sets the default values addressType(string, string, string, int);/ / Constructor that sets the street address, //for street address, city, state and zipcode. /l city, state and zipcode provided void setAddressTypelnforamtion(string, string, string, int); void setStreetAddress(string); string getStreetAddress0 const; / Returns the street address void setCity(string); string getCity) const; void setState(string): string getState0 const; void setZipCode(int); int getZipCode) const; void print) const; I/ Sets the street address Il Sets the city name // Returns the city name I/ Sets the state name // Returns the state name I/ Sets the zipcode // Returns the zipcode // print the street address, city, state, zip code private: string streetAddress; string city string state int zipcode; Wite your code to implfresT yre eas Second, consider the personType class as specified below class personType f public: void print0 const; I/ function to output the first name and last name of the person void setName(string first, string !a%); // sets the first name and last name of the person string getFirstName() const;rans the first name of the person string getLastName) const: l tarus the iast name of the person personType(string, string): 'Constructor that sets the person's first name and last name

Explanation / Answer

Write your code 1:

//default constructor

addressType :: addressType(){

streetAddress = "";

city = "";

state = "";

zipcode = 0;

}

Write your code 2:

//parameterized constructor

addressType :: addressType(string stAdd, string c, string s, int z){

streetAddress = stAdd;

city = c;

state = s;

zipcode = z;

}

Write your code 3:

void addressType :: setAddressTypeInformation(string stAdd, string c, string s, int z){

streetAddress = stAdd;

city = c;

state = s;

zipcode = z;

}

Write your code 4:

void dateType :: setDate(int month, int date, int year){

dMonth = month;

dDate = date;

dYear = year;

}

please let me know in case of any doubt

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