Created
March 14, 2020 17:42
-
-
Save PatilShreyas/42a4281f433103ef2d2803b270fc6edd 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 WithoutDI { | |
public static void main(String[] args) { | |
Education education = new Education(); | |
Job job = new Job(education); | |
Money money = new Money(job); | |
Food food = new Food(money); | |
Clothes clothes = new Clothes(money); | |
Shelter shelter = new Shelter(money); | |
Needs needs = new Needs(food, clothes, shelter); | |
Life life = new Life(needs); | |
life.enjoy(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment