write the code in python Design a class named PersonData with the following member variables: lastName firstName address city state zip phone Write the appropriate...

50.1K

Verified Solution

Question

Programming

write the code in python

Design a class named PersonData with the following membervariables:

  • lastName
  • firstName
  • address
  • city
  • state
  • zip
  • phone

Write the appropriate accessor and mutator functions for thesemember variables. Next, design a class named CustomerData , whichis derived from the PersonData class. The CustomerData class shouldhave the following member variables:

  • customerNumber
  • mailingList

The customerNumber variable will be used to hold a uniqueinteger for each customer. The mailingList variable should be abool . It will be set to true if the customer wishes to be on amailing list, or false if the customer does not wish to be on amail-ing list. Write appropriate accessor and mutator functions forthese member variables.

Next write a program which demonstrates an object of theCustomerData class in a program. Your program MUSTuse exception handling. You can choose how to implement theexception handling. Organize your non object oriented code into amain function

Answer & Explanation Solved by verified expert
4.3 Ratings (886 Votes)
Thanks for the question Below is the code you will be needing Let me know if you have any doubts or if you need anything to change Let me know for any help with any other questionsThank Youclass PersonData def initself lastName firstName address city state zip phone selflastname lastName selffirstname firstName selfaddress address selfcity city selfstate state selfzipcode zip selfphone phone def getlastnameself    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students