Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started