Last active
May 30, 2022 17:14
-
-
Save mcsee/f94d51d327592ca511b625bac37cb441 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
final class Address { | |
void print() { | |
System.out.println(this.street); | |
System.out.println(this.city); | |
System.out.println(this.zipCode); | |
} | |
bool isInCounty(Country country) { | |
return this.country == country; | |
} | |
class Job { | |
void printAddress() { | |
System.out.println("This is your position address"); | |
this.address().print()); | |
if (this.address().isInCountry(this.country()) { | |
System.out.println("It is a local job"); | |
} | |
} | |
} | |
class Candidate { | |
void printJobAddress(Job job) { | |
job.printAddress(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment