Reference no: EM132354074
Question
Implement a class Address. An address has a house number, a street, a city, a state, and a postal code. Define the constructor such that an object can be created in one of two ways: with an apartment number or without. Supply a method def print method that prints the address with the street on one line and the city, state and postal code on the next line. Supply a method def comesBefore(self,other) that tests whether this address comes before other when compared by postal code. Below is a partial program that runs the Address class. 5 pts
# Construct two address.
a = Address(2500, "University Drive", "Some City", "Some State", "12345")
b = Address(1200, "College Blvd", "Other City", "Other State", "99102")
# Demonstrate the print method for Address a and Address b
xxx
xxx
# Demonstrate the comesBefore method.
xxx
a) Your code with comments
b) A screenshot of the execution