Question

Hello Iam new in software Engineering and I need a little help in making class diagram I am confused. I am creating a class diagram for a small version of MMORPG game support system. simply with 2 actors Support agent who can Edit play data, get player data,Change player position,send email to a player,change monster levels and powers and change item drop rates and the actor 2 is admin who can create ,delete agent and ban players.

anyway Now when creating classes for implemntation should i create one class to hold agent functionality and another class for the admin inherit all agent functions + admin's original functions ... (seems more structured than oop). i mean 2 classes for 2 actors.

other idea: to group set of functions together in a class like a class Account management conatins: Login, delete and create agent.

class: EditPlayers: contains players related functions.

class monsters : contain monster related functions.

and when the user login he will be sent to a page contain his functions related to account type.

last idea: to create class for agent and class for admin and call every functions class .. I am confused which way is better to implement so i can create my class diagram and start implementing the code. thanks in advance.

Was it helpful?

Solution

You should defer any thoughts about the solution domain.

Model the nouns in your domain. For example, you should have classes for Player, Monster, Playing Field, etc. Design a state machine for each class and think about which events each class sends to other classes.

Once you get that sorted out, then allocate operations to those classes. Finally, trigger those operations with events (Mealy) or states (Moore) from your state machines. I think the Moore model will be best for you. When you have that framework, start filling in method bodies, replacing log messages with real code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top