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???
Jump to Post
Show us one code example you have tried.
For typical class inheritance see:
All 3 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.