Player m - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Player m

Description:

Auto. control. processor. Antilock Braking System Diagram ... Sales interface {abstact} Sum() Sales. Sales statistics. Sum() Sum() refersTo. Proxy. Real subject ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 17
Provided by: bost99
Category:

less

Transcript and Presenter's Notes

Title: Player m


1
A Physical Configuration for Internet-based
Encounter
Encounter GUI
Encounter engine
Encounter Server
Player m
Encounter Reporter
Internet
. . . .
Encounter GUI
Player n
Account database
GameCorp Billing server
Account processing
Hardware platform
Software subsystem
Key
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
2
Antilock Braking System Diagram
Warning lamp
Speed thresh- hold alert
Wheel speed sensor
Auto control processor
ABS controller
Pressure controller
Hydraulic pressure modulator unit
Software subsystem
Hardware
Key
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
3
Some Design Goals
  • Extension
  • facilitate adding features
  • Change
  • facilitate changing requirements
  • Simplicity
  • make easy to understand
  • make easy to implement
  • Efficiency
  • attain high speed execution and/or compilation
  • attain low size runtime and/or code base

Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
4
Begin Selecting a Basic Architecture
One way to ...
  • 1. Develop a mental model of the application at a
    high level.
  • as if it were a small application
  • e.g., personal finance application ...
  • works by receiving money or paying out money,
    in any order, controlled through a user
    interface.
  • 2. Decompose into the required components.
  • look for high cohesion low coupling
  • e.g., personal finance application ...
  • decomposes into Assets, Suppliers, Interface.
  • 3. Repeat this process for the components.

Note To use established architectures, see the
rest of this chapter
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
5
Models
To express requirements, architecture detailed
design
Class model with objects of these classes
... e.g., with Engagement classes
Use-case model Do this ... e.g., engage foreign
character
Target Application
State model reacting to these events ... e.g.,
when foreign character enters
Component model in this way ... e.g., scores
flow from to
6
Models
Class model with ...
Use-case model do this
Business use case
package
Use case
class
consists of ...
elaborated by ...
Sequence diagram
Scenarios
methods
Target Application
State model when
Component model how
States
Component
Data flow
Substates
decomposed into ...
Local data flow
organized by ...
Transitions
Sub-component
Jacobson et al
7
UML Notation and Typical Implementation
package MyPackage abstract class AbstractClass
. . . . package MyPackage class DerivedClass
extends AbstractClass int att . . . .
. void myFunction( ReferencedClass r )
. ..
package of classes
MyPackage
abstract class
AbstractClass
inheritance
DerivedClass att int myFunction()
attribute
operation
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
8
UML Notation and Typical Implementation
package MyPackage class DerivedClass extends
MyClass AggregatedClass ac int att
. . . . . void myFunction( ReferencedClass r
) . ..
MyPackage
MyClass
dependency (reference to a class)
aggregation
DerivedClass att int myFunction()
AggregatedClass
ac
1
ReferencedClass
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
9
RPG Video Game Layering
Characters
Framework layer
framework package
uses
EncounterCharacters
application package
EncounterCharacter
Application layer
PlayerCharacter
ForeignCharacter
PlayerQualityWindow
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
10
Role-Playing Game, and Encounter Packages --
showing domain classes
Framework layer
GameEnvironment
framework package
Characters
RolePlayingGame
framework package
framework package
uses
Application layer
EncounterGame
EncounterCharacters
application package
application package
EncounterGame
Engagement
EncounterCharacter
EngagementDisplay
EncounterEnvironment
PlayerCharacter
application package
ForeignCharacter
Area
EncounterAreaConnection
PlayerQualityWindow
ConnectionHyperlink
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
11
One Way to Obtain The Class Model
2. Create and/or use framework classes -- for
architecture
More general
3. Create design classes -- specific to this
application -- to complete the class model
1. Create domain classes -- from
requirements analysis
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
12
ArchitecturalDesign PatternsSummary
Design pattern
Client code
Setup code
Design Goal
Design pattern
see ...
Provide an interface to a set of objects of
various classes.
Facade
3.2.1
Cause an object to behave in a manner determined
by its current state.
State
3.2.3
Encapsulate ways of "visiting" the objects in a
collection, so that client code can select a way
of visiting at runtime.
Iterator
3.4.1
Facilitate the response of interested entities to
changes in a data source.
Observer
3.2.2.1
Interpret statements written in a formal grammar.
Interpreter
3.4.1
Adapted from Software Engineering An
Object-Oriented Perspective by Eric J. Braude
(Wiley 2001), with permission.
13
Proxy - hensikt
  • Lage en surrogat objekt for et annet objekt for å
    kontrollere tilgangen til objektet.
  • Eksempler
  • Fjern Proxy lokal representant for et objekt i
    et annet adresserom.
  • Virtuell Proxy lage store / kostbare objekter
    bare ved behov.
  • Beskyttelse Proxy kontrollere aksessen til et
    objekt.

14
Proxy eksempel
  • Problem objekter lagret på en fjern server
    trengs på en lokal server
  • Løsning lag et Proxy objekt på den lokale
    serveren. Proxy objektet kommuniserer med det
    virkelige objektet

Subjekt
request() abstrakt
Proxy
Real subject
request()
(request)
15
Proxy sekvensdiagram
aClientClient
aProxyProxy
aRealSubject RealSubject
request()
request()
16
Proxy klassediagram
Sales interface abstact
Client
Sum()
Real subject
Proxy
refersTo
Sales statistics
Sales
Sum()
Sum()
refersTo -gt Sum()
Write a Comment
User Comments (0)
About PowerShow.com