Newer
Older
Onitaizi / src / Eng_Momo / MyApp.java
@motoki miura motoki miura on 27 Feb 2022 1002 bytes English version
package Eng_Momo;

public class MyApp {
    public static void main(String[] args) throws Exception {
        // Once upon a time, an old man and an old woman lived in a certain place.
        Grandpa granpa = new Grandpa();
        Grandma grandma = new Grandma();
        // Grandma picked up a peach in the river
        Peach momo = new Peach();
        // Momotaro was born from peach
        Momotaro taro = momo.bornMomotaro();
        // The grandmother gave Momotaro a bag of kibi dumplings.
        grandma.makeDumplings();
        grandma.handOverBag(taro);

        // There was a dog. Momotaro gave the dog a kibi dumpling
        Dog dog = new Dog();
        taro.watasuKibi(dog);
        // There was a monkey. Momotaro gave the monkey a kibi dumpling
        Monkey monkey = new Monkey();
        taro.watasuKibi(monkey);
        // There was a pheasant. Momotaro gave the pheasant a kibi dumpling
        Pheasant pheasant = new Pheasant();
        taro.watasuKibi(pheasant);
    }
}