O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

dynamic modelling

Claire Lemon software engineering Inglês 26 flashcards

dynamic modelling

Flashcards do conjunto (26)

  1. 1What is the main disadvantage of defensive programming?The main disadvantage of defensive programming is that the same constraints within each precondition may be checked repeatedly in different operations.
  2. 2Which of the three strategies for implementing use cases is being used when we place methods such as createGuest(lastname : String, firstname : String, address : String) in the Hotel class?We are following the strategy of using one central class here.
  3. 3What are the 3 stratagies for implementing use cases?* One central class
    * Actor classes
    * Use cases as classes
  4. 4What are the strategies for checking the preconditions?* defensive programming - where the checking is done by the receiver
    * design be contract - checking is done by the caller
  5. 5Suppose you are designing the graphical user interface (GUI) part of a hotel system. You need to be able to check in people known to the system as well as new people. What operations on the business model might be needed to support a usable GUI?Checking in unknown people would involve the creation of a new Guest object, requiring an operation createGuest(firstName, lastName, address).
    To check in a known person, you need to find the business object that corresponds to that person. This mapping might be done by having a pick list of all people known to the system, which would require a business-model operation that returns a collection of guests, for example getAllGuests().
  6. 6How is an initial and final state represented in UML?How is an initial and final state represented in UML?
  7. 7What does a final state signify in a state machine?Final states are used to show the point or points where the object in question has finished processing. Its activity has been completed.
  8. 8In what ways does a final state differ from an initial state?There can be zero, one or more final states but at most one initial state. A final state can have several incoming transitions and no outgoing transitions, but an initial state has no incoming transitions and only one outgoing transition.
  9. 9Why might two objects of the same class respond differently to the same message?An object’s behaviour will in general be affected by the values of its attributes, which are part of the object’s state. If two objects have different values for the same attributes, they are in different states, and therefore might respond differently to the same message.
  10. 10What is the most common form of event that causes a transition between two states? How is it shown in a state machine diagram?The receipt of a message is the most common form of event that causes a transition between states. An event is used to label the transition between the states. In a state machine diagram, a transition is labelled with the name of the relevant message, which includes any arguments for that message.
  11. 11What is the difference between an event and an action?An event is something done to the object, such as sending it a message. An action is something that the object does, such as sending a message to itself or to another object. An action is an object’s reaction to an event.
  12. 12What is a guard and how does it protect a transition?A guard is a Boolean condition that is applied to a transition – the guard must be either true or false. A guarded transition can only take place when the specified guard is true.
  13. 13what is the notation for entry and exit events in a state machinewhat is the notation for entry and exit events in a state machine
  14. 14What is an entry event, and how does it contribute to the maintenance of a state diagram?An entry event can be used where there are multiple transitions, with the same actions, leading to a particular state in a given diagram. An entry event occurs every time an object enters the state that it annotates. Entry events reduce the risk of introducing errors, because the action sequence is written once (associated with the entry event of the state) rather than many times (on each of the transitions leading to that state).
  15. 15What is the benefit of using an internal event as opposed to a self-transition?When there are entry and exit events that might interfere with a self-transition, an internal event is useful because the entry and exit events are not triggered.
  16. 16Identify three problems associated with complex state diagrams that might arise when designing classes.* harder to write the eventual code for such classes because there are likely to be many conditional tests to identify the actual state
    * harder to test the classes because of the number of choices of pathway through the conditional tests
    * much harder for external code to use a class correctly without some means of ascertaining the actual state of objects belonging to complex classes.
  17. 17What characteristics of events suggest that an object should respond to them when they occur?An object should normally respond to:
    events that are external, such as those from a point-of-sale terminal
    change or time events that require some response
    certain changes, such as a high or low temperature in a process-control system, to avoid problems or even disasters.
  18. 18UML lets us describe five things about a transition. What are they?source state
    target state
    event trigger
    action (or action sequence)
    guard.
  19. 19What are the main reasons for partioning a software system?To manage size and complexity
    For information hiding
    For logical decomposition
  20. 20what do nested packages look like?what do nested packages look like?
  21. 21how could packages present different views of a software system?This diagram illustrates a three level architecturehow could packages present different views of a software system?
  22. 22Separating a software system into three layers or tiers has the following advantages:*Developers can be allocated to different layers to facilitate parallel development or the use of particular skills such as interface design
    *Reuse becomes possible in certain areas, such as business services
    *Distribution of the resultant software can be considered in response to certain performance requirements.
  23. 23Do packages contain only classes?No – they can contain any model element from UML. Among other things, you can include classes, use cases, associations and even other packages.
  24. 24Which modelling principle would lead you to form packages?You should use a package to raise the abstraction level, suppressing any detail in a particular diagram that is not necessary to understand what the model is showing.
  25. 25Explain how it is possible to have two separate elements in packages that share the same name.If you place the two elements in separate packages, they can share the same name. This is because each model element is identified by its name and the name of the smallest package that contains it.
    Accounts::AccountRecieved::Customer
  26. 26The stereotypes «import» and «access» allow you to ‘see’ through the ‘wall’ around a package. Which one can give rise to a naming problem? Which one provides the simpler traceability?The «import» stereotype can give rise to a naming problem, because an «import» adds the names of the elements in the target package to the source package. The result is that, if an imported name clashes with an existing name, you have to qualify the imported elements with their package name in order to distinguish them. The «access» stereotype allows simpler traceability, because other packages must use the full name of an accessed element, such as PackageName::ElementName.

Informações

Descrição
software engineering (7_more on dynamic modeling) FlashCards sobre dynamic modelling, criado por Claire Lemon em 01-02-2017.
Criado por
Claire Lemon
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?