Question: Exercise 3 : Address Implement a class Address. An address has a house number, a street, an optional apartment number, a city and a postal
Exercise : Address
Implement a class Address. An address has a house number, a street, an optional apartment number, a city and a postal code. Supply two constructors: one with an apartment number and one without. Supply a print not a get method that prints the address with the street on one line and the city, state, and zip code on the next line.
Use the following tester class:
public class AddressTester
public static void mainStringl args
Address al new Address bBkm Sokak", "Ankara", ;
Address a new Addressilek Sokak", "Istanbul", ;
alprint ;
aprint ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
