Re: UML Command pattern and Sate Pattern



"Bob" <rk20049@xxxxxxxxx> wrote:

I'm new to Patterns, I would really appreciate if any one can help me
out to solve the below problems?

- Thanks in advance. -Bob

1) Show how the command pattern could be applied in the Monopoly game
design. Include a class diagram and sequence diagrams for do, undo, and
redo.

Presumably, your homework included a Monopoly game design, or you had to
do one yourself. What are do, undo, and redo supposed to do, undo and
redo?

2) Show how the state pattern would apply to the Property class in the
Monopoly design. What are the states of a Property? How do they change?
Show the class diagram for the Property class with the application of
the state pattern. Show a sequence diagram for one of the state changes.

Again, show us the current Monopoly design and we can go from there.

Have you made any attempt to answer your homework questions yourself? If
so, let's hear what you have so far and maybe we can critique them.

--
To send me email, put "sheltie" in the subject.
.



Relevant Pages

  • Re: Backend/Frontend programming
    ... what may be called backend/frontend coding. ... I basicly want to code a monopoly game, ... You get one by replacing your user interface with test cases. ... Whatever your design, below the tests, you can always ...
    (comp.programming)
  • Re: Best way to integrate classes
    ... I suggested to use an interface. ... POV (and would indeed exists in the class diagram if I was to design ... except that I write less useless code!-) ...
    (comp.lang.php)
  • Re: Class Diagrams as Requirements or Design?
    ... In design, you cannot just say whatever you please (which is considered ... unambiguous problem-domain-level class diagram for this very problem. ... An operand may be either a value (as in cell) or may refer to another ... How to implement the displayed-value integrity requirement (and whether ...
    (comp.object)