A scary fairy tale
1. Once there were five classes: red riding hood, grandmother, pie, woodcutter, and wolf.
2. Each class has 2 fields: ArrayList killed and ArrayList ate.
3. The necessary objects have been created (hood, grandmother, ...).
4. Arrange the relationships correctly according to who ate and/or killed who in the fairy tale "Little Red Riding Hood".
PS: Nobody ate the pie. It was only carried in a basket. The wolf ate a little. And then he was killed.
Requirements:
1. The main method should change the state (internal variables) of the wolf object.
2. The main method should change the state (internal variables) of the woodcutter object.
3. Nobody ate the pie.
4. The wolf ate a little.
5. And then the wolf was killed.
Joyonta Saha
Level 31
Would Anyone please explain the problem more clearly?
Under discussion
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Hashirama
28 January 2019, 09:11
The woodcutter simply killed the wolf who ate the grandmother and the hood. The hood was prolly the grandmothers' and my guess is that she had it on when the wolf attacked her and ate her, together with her hood. Then the woodcutter who prolly heard a scream came to her rescue when the wolf must have eaten some of her, and killed it.
Then end!!!
+2
Joyonta Saha
23 October 2018, 18:02
Read the story on the internet first....then who ate whom all will be understood...
0
Tayyab Mubeen
23 October 2018, 10:48
how i can fulfil
wolf ate little
what does it mean by little..!!?
0
Pavlo Plynko Java Developer at CodeGym
7 September 2018, 08:29
You should do thingth in such style:
So, wolf's internal variable ate has been changed! It means requirement #1 has been done.
Etc. +2