about how much is needed for the best taste.
this is an example of factory design pattern, where you ask a factory to create an object (sandwich) for you without bothering with the details of making this object.
all what you worry about is how to receive this object back when it's created.
what problem does the factory design pattern solve ?
let's continue with our sandwich example.
this for sure not the best way to create a sandwich, especially when you have to repeat this block each time you want to make a new sandwich.
a solution to this problem is to put this logic inside a factory class and only call the factory sandwich 