Question: Python (Please modify my code by following these tasks.) Write a class named Person with data attributes: name, address and telephone number. Next, write a

Python (Please modify my code by following these tasks.)

Write a class named Person with data attributes: name, address and telephone number. Next, write a class named Customer that is subclass of Person class. The Customer class should have a data attribute for customer number, and a Boolean data attribute indicating whether the customer wishes to be on a mailing list.

**Once you have written the classes, write the main program that prompts the user to enter data for each of the Customer objects data attributes and create multiple object of the Customer class. The number of objects to be created is determined by the user. Store the data in the object, then use the objects accessor methods to retrieve each of the object and display them on the screen in a tabular form.**

my code so far is:

------------------------------------------------

class Person: def __init__(self, name, address, tel_num): self.__name = name self.__address = address self.__tel_num = tel_num class Customer(Person): def __init__(self, name, address, tel_num, cus_num=0, mail=True): Person.__init__(self, name, address, tel_num) self.__cus_num = cus_num self.__mail = mail def set_name(self): self.__name = name def set_address(self): self.__address = address def set_tel_num(self): self.__tel_num = tel_num def set_cus_num(self): self.__cus_num = cus_num def set_mail(self): self.__mail = mail def get_name(self): return self.__name def get_address(self): return self.__address def get_tel_num(self): return self.__tel_num def get_cus_num(self): return self.__cus_num def get_mail(self): return self.__mail ---------------------------

I created two classes, but especially do not know how to write next steps which are (**~~~~**) part.

Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!