Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)

sponsored links
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:

Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)

Next we create a domain model

We break down the problem to determine things and concepts, and their attributes and relationships. Been a problem domain model. We get the following diagram:
Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)


The third step, we adopted the analysis of the object graph to be the interaction between object model, then you can get map messaging between objects (communication diagram).
Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)


Another interactive map is the sequence diagram, it shows the message passing between these objects to get the sequence of events as follows:

Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)


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.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Object-Oriented Analysis and Design - A simple dice game simulation to achieve (a)

  • Welcome to the circle of ruby OFF rails

    Address http://rubyoffrails.group.javaeye.com/ circle The circle is committed to introduce and discuss the world of Rails outside of Ruby Construction Web applications in other ways. At present, the most likely and Rails competition program are Sequel to

  • At top monitor window displays the status of ongoing Rails request URL

    http://robbin.javaeye.com/blog/283992 This is from a PragDave's blog Above to learn skills, very useful, very cool! Saying in a Rails site running the above, we can use Linux's top command to monitor the Rails application instances running co ...

  • Groovy on Grails implementation using Ruby on Rails15 minutes to create the Blog

    In advance, I have only a superficial Ruby. And Rails do not come into contact with. After watching the video, or can read, and perhaps what kind of grammar can guess the meaning. Now studying Grails, by Grails so want to see implementation. First analysi

  • Do not say you understand project management

    [Introduction] to draw a blueprint , and then architecture in a building block, such as the management of projects for software development project management. Today's software developers, but also should be an engineer, rather than artists. Firs ...

  • Software engineer must know the concept of the 10

    35 kilometers wrote "excellent software engineers make the best use of design patterns and diligent code Reconstruction, the preparation of unit testing, and has easy religious pursuit. In addition to these, excellent software engineers but also prof

  • FLEX: integrating Spring + Hibernate

    Before a friend also wanted to study development of FLEX. Asked me to help him to be a small sample. Spent a weekend time, to integrate a sampleproject. Client: FLEX Server: Spring2.5 + Hibernate3.2 + Hibernate-annotations3.3.1 + MySQL5 FDS: BlazeDS3 IDE:

  • Java technology 25 study points

    1. You need to master the object-oriented analysis and design (OOA / OOD), involving patterns (GOF, J2EEDP) as well as the integrated model. You should understand the UML, especially class, object, interaction and statediagrams. 2. You need to learn basic

  • Java Technology wishing cow needed 25 points of study

    1. You need to master the object-oriented analysis and design (OOA / OOD), involving patterns (GOF, J2EEDP) as well as the integrated model. You should understand the UML, especially class, object, interaction and statediagrams. 2. You need to learn basic

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries