Created
February 5, 2018 12:50
-
-
Save soudmaijer/b15e29a0f2b2262cac62a8998abb6625 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddressBook { | |
private AddressBookRepository repository; | |
public AddressBook(AddressBookRepository repository) { | |
this.repository = repository; | |
} | |
public Address getAddressById(int i) { | |
return repository.findById(i); | |
} | |
} | |
class AddressBookRepository { | |
public Address findById(int i) { | |
return new Address(i); | |
} | |
} | |
class Address { | |
private int i; | |
public Address(int i) { | |
this.i = i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment