Domain Model For Monopoly Game
Monopoly game domain model larman figure 9 28.
Domain model for monopoly game. Using this approach i have to use mapping twice. Monopoly game domain model first identify concepts as classes monopoly game player piece die board square. Agenda visualization adding association adding attributes 22. I prefer to have view models defined in my presentation layer and use domain models to communicate between presentation layer and business layer.
Example of rdd monopoly game 3 example of rdd monopoly game monopolygame board piece name player name die facevalue square name plays owns is on contains played with played on 1 40 0 8 1 2 2 8 domain model analyze phase 4. But modeling the concept of an income tax square in a monopoly game. Monopoly concepts candidates monopoly game player piece die board square 21. Append the superclass name to the subclass.
2 use cases there is only one significant use case play monopoly game the game is run as computer simulation watched by one player more accurately observer the many possible simulated player actions are captured in the domain rules rather than the extension section domain rules requirements or policies that transcend one software project. Entity domain model. The game board consists of a set of proper9es ini9ally owned by a bank that may be purchased by the players. Distinguish between need to know and comprehension only associations.
To show that the same practices of ooa d can apply to very different problems i ve chosen a software version of the game of monopoly as another case study although the domain and requirements are not at all like a business system such as the nextgen pos we will see that domain modeling object design with patterns and applying the uml are still relevant and useful. Build a domain model for monopoly monopoly is a game in which each player has a piece that moves around a game board with the piece s change in locaon determined by rolling a pair of dice. When writing a domain model for this game that same entity in the game model would be called a player. Objectives identify associations for a domain model.
So the image shown here called an aggregate has a game class called the aggregate root. Now that money is involved. It s important to understand that the domain model must always remain in a valid state. A regularsquare that does nothing special is also a distinct concept.
The game board consists of a set of properties initially owned by a bank that may be purchased by the players. The concepts square gosquare.