7. 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 mailing list, or false if the customer does not wish to be on a mail- ing list. Write appropriate accessor and mutator functions for these member variables. Demonstrate an object of the CustomerData class in a simple program.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 1PE: In Chapter 10, the class clockType was designed to implement the time of day in a program. Certain...
icon
Related questions
Question

Please help me in C++ language 

7. 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 mailing list, or false if the customer does not wish to be on a mail-
ing list. Write appropriate accessor and mutator functions for these member variables.
Demonstrate an object of the CustomerData class in a simple program.
Transcribed Image Text:7. 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 mailing list, or false if the customer does not wish to be on a mail- ing list. Write appropriate accessor and mutator functions for these member variables. Demonstrate an object of the CustomerData class in a simple program.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,