Created
March 14, 2020 18:12
-
-
Save PatilShreyas/8c3e8375c9483ac2363b3acc4b1ecfba 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
public class Clothes { | |
public Money mMoney; | |
@Inject | |
public Clothes(Money money) { | |
this.mMoney = money; | |
if (mMoney != null) { | |
System.out.println("I've Clothes to wear!"); | |
} else { | |
System.out.println("I don't have enough clothes to wear!"); | |
} | |
} | |
} |
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
public class Food { | |
public Money mMoney; | |
@Inject | |
public Food(Money money) { | |
this.mMoney = money; | |
if (mMoney != null) { | |
System.out.println("I can eat delicious dishes!"); | |
} else { | |
System.out.println("I even can't eat meal two times a day!"); | |
} | |
} | |
} |
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
public class Shelter { | |
public Money mMoney; | |
@Inject | |
public Shelter(Money money) { | |
this.mMoney = money; | |
if (mMoney != null) { | |
System.out.println("I've my own house to live!"); | |
} else { | |
System.out.println("I don't have my own house yet!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment