I have a question in Inheritance(Python):
Write a class named Person with data attributes for a person's name, address, and telephone
number. Next write a class named Customer that is a subclass of the person class. The
Customer class should have a data attribute for a customer number and a Boolean data
attribute indicating whether the customer wishes to be on a mailing list. Demonstrate an
instance of the Customer class in a simple program.
I tried a lot but couldn't really come up with a code that satisfies the question, can someone help me with this???

Recommended Answers

Show us one code example you have tried.

For typical class inheritance see:
http://www.daniweb.com/software-development/python/threads/20774/273770#post273770

Jump to Post

All 3 Replies

Let's see what you have done, so has to be able to point you in the right direction.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.