Problem 1 Implement Class Address Address House Number Street Optional Apartment Number Ci Q37186685

Problem 1:
Implement a class Address. An address has a house number, a street,an optional apartment number, a city, a state, and a postal code.Supply two constructors: one with an apartment number and onewithout. Supply a print method that prints the address with thestreet on one line and the city, state, and postal code on the nextline. Supply a method public boolean comesBefore (Address other)that tests whether this address comes before another when theaddresses are compared by postal code.

Problem 2:
Implement a class with methods getSurfaceArea() and getVolume(). Inthe constructor supply the height and radius of the can.


Answer


thanks for the

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.