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 3: 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
1
public static void main(String[l args)
(
Address al = new Address ("1b","Bk_m Sokak", "Ankara", "06680");
Address a2- new Address("10","2","ilek Sokak", "Istanbul", "34714");
al.print ();
a2.print ();
}
}
 Exercise 3: Address Implement a class Address. An address has a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!