Was recommended this forum by a friend of mine and the expertise here seems to be beyond anything I've seen before, so I'm thrilled to learn a lot from it. I'm currently studying a Object Oriented Java course in Sweden through BlueJ (the course book is David Barnes' Objects First With Java) and I'm currently stuck at a problem concerning randomizers, HashMaps and those kind of things.
The object is to enter a persons name and then generate seven different events and 'mood points' on each day of the week (these mood points will be different on every event). There are four different classes for this:
Person: [Java] class: Person - Pastebin.com
EventGenerator: [Java] class: EventGenerator - Pastebin.com
Event: [Java] class: Event - Pastebin.com
Dice: [Java] class: Dice - Pastebin.com
The problem I'm having is how to write the code in Person and generally the methods listWeek(), affectMood() and generateDayEvent(). I think I'm heading the right direction, but I can't figure out how to generate a new event for each day —*the main problem is really how to fetch the data from the generator.
Notice: I'm asking you to give me the code needed, because this is a problem I have to solve in school. But I'm asking you for some guidance and suggestions.
If you prefer me to paste the code directly into this post, I'll do that. Not sure about the manners in here. (: