08.07.2022 - 09:03

PersonData and CustomerData classes Design a class named PersonData with the following member variables: -lastName -firstName -address -city -state -zip -phone Write the appropriate accessor and mutat

Question:

PersonData and CustomerData classes

Design a class named PersonData with the following member variables:

-lastName

-firstName

-address

-city

-state

-zip

-phone

Write the appropriate accessor and mutator functions for these member variables.

Next, design a class named CustomerData, which is derived from the PersonData class.

The CustomerData class should have the following member variables:

-customerNumber

-mailingList

The customerNumber variable will be used to hold a unique integer for each customer.

The mailingList variable should be a bool. It will be set to true if the customer wishes to be on a mailingList, or false if the customer does not wish to be on a mailingList.

Write appropriate accessor and mutator functions for these member variables.

Demonstrate an object of the CustomerData class in a simple program. Must be on one source.cpp file.

Answers (1)
  • Eddie
    April 17, 2023 в 11:47
    The given prompt requires the creation of two classes - PersonData and CustomerData - with specified member variables and appropriate accessor and mutator functions. The CustomerData class is also required to be derived from the PersonData class. The program should also demonstrate an object of the CustomerData class in a single source.cpp file.
Do you know the answer?

Leave a comment

Not sure about the answer?
Find the right answer to the question PersonData and CustomerData classes Design a class named PersonData with the following member variables: -lastName -firstName -address -city -state -zip -phone Write the appropriate accessor and mutat by subject Tech and Engineering, and if there is no answer or no one has given the right answer, then use the search and try to find the answer among similar questions.
Search for other answers
New questions in the category: Tech and Engineering
Authorization
*
*

Password generation