View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007

33k! M5 Application Design

Using the domain design from M3 as a base, the group started working on the Object-Oriented Design phase of the project. During this phase it is that the group designed the architecture and trust boundaries. The application model and user interface were taken into account. This is also where the group, unaware, started employing the use of design patterns. Before we had been taught about the facade pattern, the group had inadvertently implemented it with the game class. The Saver and loader was implemented. UML class diagram as well as UML sequence diagrams were made. Two scenarios were used for the latter. These two scenarios look very basic, but as can be seen in the sequence diagram, they are very involved.

An event manager and event responder were implemented. These communicate via trigger events, thus reducing the coupling.

Some screenshot mockups were produced with an idea of what the game was to look like.

Also, the way the group would take on exception handling was explained and again, the importance of focusing on one spending a good amount of time on each step in the process was shown, because a solid domain design saved a lot of time in the domain coding phase.

file:///C|/Documents%20and%20Settings/kissie/Desktop/M5_turnIn/AppUtility.txt

M5 33k! TA David

Application/Utility Classes not in Domain

ExceptionManager (not shown in UML, we were told we didn't need to show this class) EventType EventResponder SaverLoader

M5 33k! TA: David

Exception-handling strategy

The AppModel and EventResponder are gateways to the user interface and user. Therefore, any user-entered data passed down from EventResponder or AppModel will be checked for exceptions. Each aspect in the AppModel or EventResponder dialogs will have certain parameters that are checked by ExceptionManager such as not being able to have a character for a number. Only then, are they passed to Domain or Application-level objects.

Any aspect that fails will re-prompt the user for a more appropriate value and the process for checking the exception and either allowing entering the domain or prompting the user for a more correct value will cycle.

Inside our security boundary which is our domain or application level, the strategy will be that if an exception occurs, it is likely an unknown error and will be logged and the game will shut down while notifying the user of such.

M5 33k! TA: David

New Scenarios

Scenario 1:

The user calls for a new game through the User Interface. She sees a screen asking if she wants to load, save or play a new map. She selects new map. She then sees another screen that prompts her for her profession and the names of 5 members of her party. Then she sees another screen prompting her to buy some items such as oxen, food, clothes, parts, etc, and is presented with quantity options and monetary values. At the top of the screen she sees that she has $1600 and that she’s a banker. She selects her quantities of items and hits accept.

Scenario 2:

The user is looking at the main game screen with some status, information, terrain, and the wagon on the terrain and there are four buttons: hunt, rest, move, and trade. The user sees that the rations have been depleted and the day has passed on the status information. The status also shows that the wagon has traversed 10 more miles.

passengerEat Obligations Benefits
Client: Wagon (precondition) Food is available. (postcondition) Food value goes down. Party is fed.
Service provider: Person (precondition) Person is not dead. (postcondition) Health is adjusted. Lifespan is determined by whether or not Person eats i.e. health is improved.
addPerson Obligations Benefits
Client: Wagon (precondition) There must be room for a Person. Person must exist. (postcondition) Collection of people in Wagon is increased by 1. Wagon has the Person.
Service provider: Person (precondition) (postcondition) Person is now in the Wagon i.e. Wagon now has a Person. Wagon has the Person.
processMile Obligations Benefits
Client: EventManager (precondition) An initialized Wagon must be passed in. An initialized Map must be passed in. (postcondition) Wagon’s properties may or may not be changed. Allows Map and Random Events to interact with the Wagon.
Service provider: Game (precondition) EventManager has static methods. (postcondition) EventManager returns the changed Wagon. Game processes the Wagon movements through the EventManager.
moveAMile Obligations Benefits
Client: Wagon (precondition) Wagon is on a valid spot for moving on the Map. (postcondition) Wagon’s current mile has changed. Allows Wagon to move across the Map.
Service provider: Game (precondition) Wagon must exist. (postcondition) Allows the user to move the Wagon.
addItem Obligation Benefits
Wagon Precondition: The item has to exist in the The wagon now has a new item.
game world. The item can’t exceed the weight-holding capacity of the wagon.
Postcondition:
The collection of items in
wagon is increased by the number of items purchased.
item Precondition: None. The wagon has the item.
Postcondition:
The wagon has the item.


Link to this Page

  • 33k! last edited on 12 December 2008 at 8:47 pm by c-76-17-51-57.hsd1.ga.comcast.net