Purpose and task Objective: familiar with the UML, familiar with the state policy mode. Task: Following the experimental content requirements, the completion of use, strategies to achieve experimental mode content. |
||||||||
Content preview UML review the contents of the course, familiar with the state, the strategy pattern. |
||||||||
Experiment contents and requirements
1, using the state model, to achieve the cancellation of the landing operation, and FIG class given implementation.
|
||||||||
The results (available Continued) A: Status Mode Context (Environment category): State (Status abstract class): ConcreteState (specific state category):
Main.java: operation result: Class Diagram: II: Strategy Mode Context (Environment category): At Strategy (Strategy abstract class): ConcreteStrategy (specific policy class): Main.java: operation result: Class Diagram:
Questions:
2, a variety of cinema ticket fare discount, fare system design calculations, is given class diagram.
|
State, strategy pattern
Guess you like
Origin blog.csdn.net/yszbrzdd/article/details/93522462
Recommended
Ranking