TM354 Flashcards
Causes of software errors [3]
Malleability
Complexity
Size
A good software system is… [6]
Useful Usable Reliable Available Flexible Affordable
Legacy systems are… [8]
Old
Large
Developed using outdated technologies
Implemented in old programming languages
Critical to the business
Changed a number of times since inception
Difficult to understand due to lack of documentation or experience
Therefore difficult to maintain
A module should… [4]
Have low coupling, high cohesion, a well-defined interface and represent a good abstraction
Reuse can improve development in terms of… [4]
Maintainability
Cost
Delivery time
Quality
Development activities [5]
Domain modelling Requirements elicitation + analysis Design Implementation Testing
Traceability
Tracing the history of each requirement from its origin in the problem domain to its fulfillment in the final system.
What will determine the level of traceability?
The chosen development process
The UP advocates which development practices?
Timeboxing
Big risks up front
Early architecture
User involvement
The UP stages [4]
Inception
Elaboration
Construction
Transition
User stories should be… [6]
Independent Negotiable Valuable to users Estimable Testable Small
Difference between business functional requirement and technical solution requirement
Business functional requirement: system authenticates the users.
Technical solution requirement: authenticate users via a password
How to gather Software Functional Requirements
Business processes/events -> Use cases -> Scenarios -> Functional tasks -> Software functional requirements
Non-functional Requirement Types [8]
Look and feel Usability and humanity Performance Operational and environmental Maintainability and support Cultural Legal Security
Performance Fit Criteria [6]
Speed Capacity Safety Accuracy Reliability Availability
Seucirty Fit Criteria [5]
Access Privacy Integrity Audit Immunity
Function and non-functional requirements must have ______ so that they are testable
Fit criteria
Volere template sections [5]
- Project drivers
- Project constraints
- Functional requirements
- Non-functional requirements
- Project issues
Main concepts in a business domain [4]
Resources
Processes
Rules
Goals
Examples of business processes and business rules
Business process: renting a car
Business rule: lowest mileage car always allocated
Use cases are used to capture ______ [1]
Functional requirements
Scenarios are used to ________ [1]
Illustrate the different ways a use case can unfold
Use case description [8]
Identifier + Name Initiator Goal Precondition Postcondition Assumptions Main success scenario
Each step in a use case may correspond to _______
One or more software functional requirements
Each software functional requirements should ______ [3]
Be unambigious
State what the system should do (not how)
Have a fit criterion
Use cases help to _______ [5]
Capture requirements Capture software requirements Plan development Validate the system Narrow down architecture
Use case descriptions help to _________ each use case [4]
Understand the complexity
Determine which actors are involved
Understand the level of risk
Estimate effort to implement
Use case diagrams:
What are Inclusion and Extension?
Are they conditional or unconditional?
Inclusion: Two or more use cases have overlapping functionality that can be factored out as a separate use case. Unconditional.
Extension: A use case has alternative scenarios that demand a variation on the original use case. Conditional.
Use case modelling steps [5]
- Identify the actors
- Analyse the behaviour
- Find common behaviour and variations
- Draw the model to show the actors, use cases and their relationships
- Annotate as you learn more
You should stop prototyping when _______ [1]
When you are not generating new requirements
Difference between use case and user story
A use case describes a business process
A user story is a single, small piece of user functionality
Conceptual class attributes represent _____ [1]
Terms from the domain expert’s vocabulary
Generalisation, specialisation and interfaces are not required during _______
Domain modelling
Express the constraint that a library member’s current loans and past loans must not overlap
context LibraryMember inv:
(pastLoans -> intersection(currentLoans)) -> isEmpty()
Express the constraint that the room that a guest is occupying be part of the hotel that the guest is linked to
context Guest inv:
self.currentRoom.notEmpty() implies self.currentRoom = self.hotel
OCL logical operators [5]
and or xor not implies
OCL operations [14]
c1 -> isEmpty()
c1 -> notEmpty()
c1 -> count()
c1 -> includes(object) c1 -> includesAll(c2) c1 -> any(expression) c1 -> select(expression) c1 -> forAll(expression) c1 -> exists(expression)
s1 = s2 (contains same elements) s1 -> untion(s2) s1 -> intersection(s2) s1 - s2 s2 - s1
DbC helps to relate the requirements to the code by ______ [1]
Providing traceability
A subclass must neither ______ the precondition nor ______ the postcondition of its superclass
strengthen, weaken
Postconditions consist of ______ [3]
Creating/removing objects
Creating/removing links
Modifying attributes
Dynamic modelling helps to decide ______ [1]
Which operations should be allocated to which classes
Communication diagrams emphasise _______.
Sequence diagrams emphasise _________.
Communication diagrams emphasise the sending and receiving of messages.
Sequence diagrams emphasise the ordering of messages.
The responsibility for creating objects should be given to the class that ________ [4]
Aggregates or contains the objects
Uses the object
Maintains the object
Provides initialisation information
When a responsibility involves consolidating information that is distributed among objects, it should be assigned to _______ [1]
The class that has the most information to fulfill it
When can you update the navigability of associations?
Once you have interaction diagrams
The Law of Demeter
An object can send messages to _______ [4]
Objects sent as parameters to the current method
New objects that the object has created in the current method
Objects that it has direct links to (its immediate neighbours)
Itself
Sequence diagram loop syntax
- [i:= 1..12] printReportForMonth()
Difference between defensive programming and DbC
Defensive programming: always check preconditions before processing.
DbC: Assume that precondition has been met
What is the One Central Class strategy?
Advantages [2]
Disadvantages [1]
All UI messages are sent to a single object.
+ Low coupling
+ Good traceability
- Central class can become overloaded
What is the Actor Classes strategy?
Advantage [1]
Disadvantages [2]
All UI messages are sent to objects that correspond to the real-world initiator.
+ System corresponds to real world
- Traceability is more difficult
- A use case may have more than one initiator
What is the Use Cases as Classes strategy?
Advantage [1]
Disadvantage [1]
All UI messages are sent to use case objects, which each have a run() method. e.g. checkerIn.run()
+ Increases usability as changes in workflows/business rules are localised to one class
- Increased coupling as UI communicates with several classes
What are state machine diagrams represent?
What are they used for?
They represent the life histories of objects.
They are used to model software objects receiving messages or real-world objects responding to events
In a state diagram, if an event has consequences beyond a state change these can be modeled as _______ [1]
Actions
State machine actions should only refer to things that the object knows about, including ________ [4]
Its attributes
Its operations
Its links
The parameters of the message it receives
What are entry/exit events on a state machine?
What is their syntax?
Events that take place each time there is a transition into or out of a state, including self-transitions.
entry / setOccupant(aGuest)
exit / removeOccupant()
How can you avoid triggering entry/exit events on a state machine?
What is the syntax?
An internal transition does not involve a change of state.
hotelLimitChanged() / resetAvailableRooms()
When deciding which attributes to include in a state diagram you should consider _______ [1]
Each attribute’s frequency of change
In a state diagram, transitions have _______ [5]
Source state Target state Event trigger (message) Action / action sequence Guard