Object-Oriented Analysis and Design
Since school is finally ushered in the real software engineers core courses: OOAD, Object-Oriented Analysis and Design. Teacher's always professional, I also listen to the whole day. In the classroom, teachers use a throwing dice game introduced the concept of object-oriented analysis, and lead us to the case analyzed. After class, I get enough, so when the class teacher in accordance with the method of analysis and design, and implement the basic functionality with java. Analysis and code will now be attached, after packing the jar in the annex for all to download, hope master wing.
For this case we are generally governed by the following steps:
1, define use cases
2, a domain model
3, build interactive map
4, development and design class diagram
Now start the analysis:
First, consider this description of the problem: This is a dice game, a throw two dice, two dice if the sum of 7 points is determined to win, otherwise lose.
In this case (case) where a total number of objects (which can be understood as an entity)?
Obviously, there are two: the dice, gambler.
So we can begin to define the Use Case (use cases).
So, in the end what is the Use Case it? In the UML documentation, Use Case is defined as: not to show the internal structure of a system or subsystem in the case of a coherent system or subsystem of the functional unit definition and description. It means the system functions (part of) the description. Of course, this function must be logically complete. Such as eating, sleeping, and so it is clear do what.
In this case, only one use case dice (to play the game). Can be described as follows:
Use Case: Play a Dice Game
• Primary Actor: Player
• Description: The player picks up and rolls the dice. If the dice total seven, they win, otherwise they lose.
General description of use cases in addition to text outside the best with a dapper figure, which uses UML to describe the map, so regardless of whether the industry background will be clear to see. The use case diagram, as follows:
Next we create a domain model
Another interactive map is the sequence diagram, it shows the message passing between these objects to get the sequence of events as follows:
These two figure generally referred to as interaction diagrams (interaction diagrams).
Through the above analysis, and finally, we can get a software architecture model classes model the detailed structure of the solution. As shown below, no doubt, the rest into coding it!
Now a full UML modeling process is complete, because I am also a beginner, so in addition to the first picture is I use JUDE-COMMUNITY painting, other teachers were taken from the courseware. UML's friends want to give me guidance or expert.