171k views
4 votes
100 POINTS!!
Write in Python

11.3

100 POINTS!! Write in Python 11.3-example-1

1 Answer

4 votes
class Person:
def __init__(self, name, address, telephone):
self.name = name
self.address = address
self.telephone = telephone

class Customer(Person):
def __init__(self, name, address, telephone, customer_number, mailing_list):
super().__init__(name, address, telephone)
self.customer_number = customer_number
self.mailing_list = mailing_list

# Create an instance of the Customer class
customer1 = Customer("John Smith", "123 Main St", "555-1234", "12345", True)

# Print out the customer's information
print("Name:", customer1.name)
print("Address:", customer1.address)
print("Telephone:", customer1.telephone)
print("Customer Number:", customer1.customer_number)
print("Mailing List:", customer1.mailing_list)
User RdlP
by
7.8k points

No related questions found