Question: Prior to writing your program, use PowerPoint to draw a UML diagram of the class. An address has a house number, a street, an
Prior to writing your program, use PowerPoint to draw a UML diagram of the class. An address has a house number, a street, an optional apartment number, a city, a state and a postal code. Define the constructor such that an object can be created in one of two ways: with our without an apartment number. Supply a 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. This method should return a boolean value.
Step by Step Solution
3.40 Rating (159 Votes )
There are 3 Steps involved in it
Step 1Heres a Python program implementing the Address class class Address definitself houseNumber street city state postalCode apartment NumberNone se... View full answer
Get step-by-step solutions from verified subject matter experts
