pls someone explain this
how to ate little?
how to kill wolf?
package com.codegym.task.task09.task0924;
import java.util.ArrayList;
/*
A scary fairy tale
*/
public class Solution {
public static RedRidingHood hood = new RedRidingHood();
public static Grandmother grandmother = new Grandmother();
public static Pie pie = new Pie();
public static Woodcutter woodcutter = new Woodcutter();
public static Wolf wolf = new Wolf();
public static void main(String[] args) {
// write your code here
//woodcutter = null;
ArrayList a = new ArrayList();
a.add(4);
a.add(6);
wolf.eaten = a;
woodcutter.eaten = a;
pie = null;
/*hood.eaten = a;
wolf.eaten = hood.eaten;
System.out.println(wolf.eaten);
ArrayList b = new ArrayList();
b.add(4);
b.add(6);
wolf.killed = b;
woodcutter.killed = wolf.killed;
System.out.println(woodcutter.killed);*/
}
// Red riding hood
public static class RedRidingHood extends StoryItem {
}
// Grandmother
public static class Grandmother extends StoryItem {
}
// Pie
public static class Pie extends StoryItem {
}
// Woodcutter
public static class Woodcutter extends StoryItem {
}
// Wolf
public static class Wolf extends StoryItem {
}
public static abstract class StoryItem {
public ArrayList<StoryItem> killed = new ArrayList<>();
public ArrayList<StoryItem> eaten = new ArrayList<>();
}
}