Objects that I would use to from the Fantasy Game Scenario to create a data model include; Player object, Message object and Chat object. This is because there will be multiple instances of the objects in the system and therefore to help organize information stored by the gaming system in a logical manner and which makes it easy to retrieve, the unemployed professors would create the objects whose properties apply across each instance.
Need assignment help for this question?
If you need assistance with writing your essay, we are ready to help you!
Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality
The Player object will represent each one of the players signed up on the system. Properties of the player object include; name, id and score. The name property is user-defined and serves as a way of distinguishing and identifying the player amongst other players. The id property is also a unique property that is system-defined. Each Player object has this property set by the system. It is a way of enabling the system distinguish one player from the rest. The score property represents the score a player attains after playing the game. This is the property that is used to rank players.
The Message object will represent each single message that a player sends through the system to another player. Properties of the Message object include; content, id, sender, recipient and time. The content property would represent the actual information or text. The id, as with the id of Player object, is system-defined and is used to uniquely identify each messenger send in the system. The sender property refers to the player who sends the message while the recipientproperty refers to the Player object that the message is targeted for. Finally, the time property represents the actual time that the message object is send. It is used to inform the recipient of when it was composed.
The Chat object will represent chats that Player objects send to each other in the system. Its properties would be messages, id and players. Messages property refers to a collection of Message objects that are contained in the chat. The id property is a property of each chat that distinguishes it from the rest of the charts while the players property represents all the Player objects that create Message objects that constitute the specific chat.
In the data model, the unemployed professors tell us that Player object has a one-to-many relationship with the both the Message and the Chat object; a single player in the system sends numerous messages in different chats when playing games. Also, the Chart object has a one-to-many relationship with the Message object; a single chat is made up of many different messages send by different players.
To implement the ranking functionality, the score and name properties of each user will be user. The system will have a Scoreboard object that will access the fields and use the to rank players and finally display the information on. The following UML diagrams illustrate how the objects relate to one another to form the data model for the gaming system architecture.
UML class diagram according to the unemployed professors
Figure 1 UML Diagram showing relationship between Player, Message and Chat objects