My job is an IT shop. I'm writing a program in Java or Ruby, but I want to find fun.
My hobby is cooking. When I'm cooking, I don't have to think about anything, I just move my hands, so I like it.
I wonder if programming can be done like cooking ...
** Hamba ァ ァ ァ ァ ァ !!!!!!!! **
--Seeds --Minced meat --Onion --Egg --Bread crumbs
It's easy.
This time I will make it in Java.
//Hamburger cooking class
// -Each cooking process class is inherited as if it were
// -There is also a plate class
class CookingHamburgSteak extends Cooking {
public static void main( String[] args ) {
//Bake
Seed beakedSeed =
super.beak( new Seed() );
//Boil down
Sauce boilDownSauce =
super.boilDown( new Sauce() );
//Serve
Dish dish = new Dish();
dish.on( beakedSeed );
dish.on( boilDownSauce );
//eat
System.out.println( dish.isBeautiful() ? "looks so good!!" : "looks so bad..." );
System.out.println( dish.isTaste() ? "yummy!!" : " yucky..." );
}
}
//Hamburger seeds
// -There shall be a class for each material
class Seed {
// field
private Meat meat;
private Onion onion;
private Egg egg;
private Breadcrumbs breadcrumbs;
// getter
// (・ ・ ・ Because it is troublesome, it is omitted ...)
// setter
// (・ ・ ・ Because it is troublesome, it is omitted ...)
}
//Hamburger sauce
// -There shall be a class for each material
class Sauce {
// field
private Ketchup ketchup;
private Worcestershire worcestershire;
private RedWine redWine;
private Honey honey;
// getter
// (・ ・ ・ Because it is troublesome, it is omitted ...)
// setter
// (・ ・ ・ Because it is troublesome, it is omitted ...)
}
Cooking with programming is not fun.
Recommended Posts