Docstoc

advantages

Document Sample
advantages Powered By Docstoc
					HAS
  class Administration                              class ConsultantDoctor < Doctor
   attributes                                        attributes
   hospitalName : String                             isResponsibleFor : Patient
   teams : Set(Team)                                 operations
   wards : Set(Ward)                                 getTitle() : String = 'Prof.'
   patients : Set(Patient)                           end
   operations
   admitPatient( pName : String, address : String   abstract class Doctor
   , dob : String , wName : String , tCode :        attributes
   String) : Patient                                name : String
   checkName(pName : String): Boolean               title : String
   end                                              treats : Patient
                                                    pay : Integer
   class Bed                                        onteam : Team
   attributes                                       operations
   bedNumber : Integer                              getName() : String
   patient : Patient                                end
   ward : Ward
   operations                                       association ConsistsOf between
   bedAssigned(wardName: String,                    Team[1] role onTeam
   bedNumber:Integer, newPatient:Patient): Bed      Doctor[1..*] role doctorOn
   bedUnassigned(wardName: String, benNumber:       end
   Integer): Bed
   end                                              association IsResponsibleFor between
                                                    ConsultantDoctor[1] role under
   class Patient                                    Patient[0..*] role isresponsiblefor
   attributes                                       end
    name : String
    isOn : Ward                                     association IsHeadedBy between
    aTeam : Team                                    Team[1] role inchargeof
    aWard : Ward                                    ConsultantDoctor[1] role runby
   operations                                       end
    admitPatient(aWard : Ward , aTeam : Team ):
   Patient                                          association HasOn between
   end                                              Ward[1] role ison
                                                    Patient[0..*] role hason
   class Nurse                                      end
   attributes
    name : String                                   association Wards between
    worksOn : Ward                                  Administration [1]
   end                                              Ward[0..*]
                                                    end
class Ward
   attributes                                       association WorksOn between
    name : String                                   Nurse [0..*]
    hasOn : Patient                                 Ward[1]
    bedsOn : Set(Bed)                               end
    aTeam : Team
    aPatient : Patient                              association Interacts between
   operations                                       GUI [0..*]
    admitPatient(aPatient : Patient , aTeam :       Administration[1]
   Team ) : Patient                                 end
   end
                                                    association Supervises between
   class Team                                       Nurse[1] role boss
   attributes                                       Nurse[0..*] role worker
   name : String                                    end
   tCode : String
   caresFor : Patient                               association Beds between
   consistsOf : Set(Doctor)                         Ward[1] role isOn
   isHeadedBy : ConsultantDoctor                    Bed[0..*] role hasOnRole
   aPatient : Patient                               end
   operations
   addPatient(aPatient : Patient ) : Patient        association Teams between
   end                                              Administration [1]
                                                    Team[0..*]
  class JuniorDoctor < Doctor                       end
  operations                                        association Treats between
  getTitle() : String = 'Dr.'                       Doctor[0..*] role istreatedby
  end                                               Patient[0..*] role treatsRole
                                                    end
                                  Patterns

•   The use of patterns is essentially the reuse of well established good ideas. A
    pattern is a named well understood good solution to a common problem in
    context. Patterns describe how objects communicate without become entangled in
    each other’s data models and methods. Keeping this separation has always been
    an objective of good OO programming, objects should mind their own business,
    but obviously need the services of other objects as well. Definition “Patterns
    identify and specify abstractions that are above the level of single classes and
    instances, or of components”. Patterns can exist at many levels from very low
    level specific solutions to broadly generalised system issues . Patterns are often
    described using UML together with a pattern template A template describes a
    pattern. Typical template may contain: Name, Intent, AKA, Motivation,
    Application, Structure, Participation, Collaborations, Consequences,
    Implementation, Sample Code, Known Uses, Related Patterns.
•   Main advantages capture best practice, reuse, fairly standard way of describing
    patterns.
•   Disadvantages: advanced topic, learning design patterns is a long multiple step
    process; Acceptance, Recognition, Internalisation, on the other hand they are
    worth learning. Role of experience. More geared to OO than other computing
    paradigms.
                                  Patterns

•   The use of patterns is essentially the reuse of well established good ideas. A
    pattern is a named well understood good solution to a common problem in
    context. Patterns describe how objects communicate without become entangled in
    each other’s data models and methods. Keeping this separation has always been
    an objective of good OO programming, objects should mind their own business,
    but obviously need the services of other objects as well.
•   Definition “Patterns identify and specify abstractions that are above the level of
    single classes and instances, or of components”. Patterns can exist at many levels
    from very low level specific solutions to broadly generalised system issues
•   Patterns are often described using UML together with a pattern template. A
    template describes a pattern. Typical template may contain: Name, Intent, AKA,
    Motivation, Application, Structure, Participation, Collaborations, Consequences,
    Implementation, Sample Code, Known Uses, Related Patterns.
•   Main advantages capture best practice, reuse, fairly standard way of describing
    patterns
•   Disadvantages: advanced topic, learning design patterns is a long multiple step
    process; Acceptance, Recognition, Internalisation, on the other hand they are
    worth learning. Role of experience. More geared to OO than other computing
    paradigms.
                   Action Languages

• ALs can create, delete, directly change (via assignment) and
  send state changing messages to objects. The action language
  is executable and allows us to describe and execute the
  actions an object performs when receiving a stimulus. AL
  features:
• Sequential Logic
• Access to the data described by the Class Diagram
• Access to the data supplied by signals initiating actions
• The ability to generate signals
• Access to timers
• Access to synchronous operations provided by classes and
  objects
• Access to operations provided by other MDA domains
                   Action Languages

• ALs can create, delete, directly change (via assignment) and
  send state changing messages to objects. The action language
  is executable and allows us to describe and execute the
  actions an object performs when receiving a stimulus. AL
  features:
• Sequential Logic
• Access to the data described by the Class Diagram
• Access to the data supplied by signals initiating actions
• The ability to generate signals
• Access to timers
• Access to synchronous operations provided by classes and
  objects
• Access to operations provided by other MDA domains
                       Action Languages
• OMG only define Action Language Semantics (ASL) (not syntax), hence
  many possible flavors. Unlike conventional languages, there is no concept
  of a “main” function or routine where execution starts. Rather, ASL is
  executed in the context of a number of interacting state machines, all of
  which are considered to be executing concurrently and in the context of
  synchronous call stacks invoked from these state machines or directly
  from outside the system. Any state machine, on receipt of a signal (from
  another state machine or from outside the system) may respond by
  changing state. On entry to the new state, a block of processing is
  performed. This processing can, in principle execute at the same time as
  processing associated with another state machine. In short ALs support
  concurrency and animate UML models, In particular statecharts and
  interaction diagrams can be run by:
• 1) creating objects with the keyword create
• 2) linking objects with the keyword link
• 3) sending messages with the keyword generate
                       Action Languages
• Role in development.
• Because ALs can create objects and send messages to objects, they permit
  a range of modelling, prototyping and testing tasks.
• ALs can be used during analysis and design to specify and test (or check)
  general purpose constraints and other modeling needs.
• MDA aspect.
• ASL (Action Specification Language ) is designed to fill the semantic gap
  in UML and conforms to the UML Action Semantics Request for
  Proposal issued by the OMG. It supports platform independently action
  specifications [PIMS] for UML models and provides easy-to-understand
  operations on UML classes, objects and associations (which is not the
  case in usual programming languages).
• Realtime
• ASL useful for real-time embedded system, with high concurrency and
  timers/triggers required.
• ASL can directly model behavior whereas OCL can only model
  constraints about behavior.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:2
posted:10/21/2012
language:Latin
pages:8