Part 1 Flashcards
(127 cards)
A good software system is one that meets its users’ needs. List three characteristics that such a system should possess.
A good software system should be useful, usable, reliable, flexible, affordable and available (any three from this list).
Give two ways in which agile software development can help achieve a good software system.
Agile software development is based on principles such as the ones below which help to achieve some characteristics of a good software system:
Software should be capable of adapting to change in requirements, helping to achieve a flexible and useful system.
Software should be delivered on time helping to achieve an available system.
What is the difference between a functional requirement and a nonfunctional requirement?
A functional requirement is one that specifies an action the software must perform e.g. check, calculate, record, retrieve etc., whereas a non-functional requirement specifies a quality that the software must possess, e.g. usability, reliability, maintainability etc.
What are the advantages of using a standard template, such as the Volere template, for requirements capture?
(b) Using a standard template for requirements capture
saves wasting time repeatedly making decisions about what to record;
ensures that nothing important is left out;
assists communication between developers;
allows projects to be compared and requirements reused in some cases. (any three of these)
What are the benefits of prototyping? Who should test a prototype?
The benefits of prototyping include
It helps with the design of the user interface;
it gets the users involved and is a good way of capturing and refining requirements;
it help minimise misunderstandings between the developer and the users;
it may allow early detection of possible problems, before things have gone too far, and at a relatively low cost; (any three benefits) [3 marks]
The prototype should be tested by ‘real’ users – those who will be using the software on a day-to-day basis.
Is it possible, to identify, using the model in Figure 1, which prescriptions were issued by a doctor? Explain your answer using either English or OCL.
(a) Yes, it is possible.
For a given doctor it is possible to find the set of all patients of that doctor following the association between Doctor and Patient; and for a given patient it is possible to find the set of all prescriptions for that patient following the association between Patient and Prescription.
OR
context Doctor: – The set of Prescriptions given by a Doctor of that Clinic. self.patient.prescription
For the association loop in Figure 1 find an invariant that should apply to the model. Write the invariant, in the context of the class Clinic, either in OCL or using an unambiguous description in English.
The unambiguous English description is shown as a comment in the OCL specification. context Clinic inv: – the set of Patient instances linked to all Doctor instances of the Clinic is the same as the set of Patient instances linked to the Clinic self.doctor.patient = self.patient
This question refers to the class model in Figure 1. Suppose we want to implement a use case print prescription. We decide to use Clinic as the system class and implement the use case with a system operation that takes an argument of type Patient, and an argument of type Date (the date of the prescription to print). Draw a sequence diagram showing how this operation could be implemented, inventing suitable names for the methods and parameters required.
In a shared hallway, the light is operated by a press-button switch. Initially, the light is off. Whenever the button is pressed, the light is switched on. As an energy saving measure the light only remains on for 2 minutes after being switched on, then switches itself off again automatically. Draw a statechart diagram for the hallway light, assuming the existence of an event after(2 minutes) that occurs after 2 minutes of remaining in a given state.
What is the relationship between stakeholders and architectural views?
An architectural view represents the concerns of a set of stakeholder groups.
What is reused in a framework?
A framework reuses an architecture together with code for components that can slot into that architecture.
How are the Model-view-controller (MVC) and Observer software patterns related?
In MVC the view needs to be kept updated when the state of the model changes. This can be achieved by using the Observer pattern, with the model as the subject and the view as the observer.
Suggest one advantage and one disadvantage of developing software by plugging together off-the-shelf components.
Advantages of plugging together off-the-shelf components
Should be cheaper
Allows quicker development
Behaviour of well-tried components will be well understood
Components are replaceable with other components that have to same interface (any one of these)
Disadvantages
We will be restricted to the capabilities of the components
Some additional software is likely to be needed Adapters may be needed if interfaces are incompatible
Creating a system from pluggable components may be more difficult than it sounds. (any one of these)
What is the difference between a provided and a required interface?
A provided interface describes the operations a component provides to other components. A required interface describes the operations a component requires from other components.
The usual response measures for a performance scenario are latency, deadline, throughput, jitter, miss rate and data loss. Choose two of these that would be most appropriate in the case of an internet radio service, and briefly explain your answer
Latency will affect how quickly a channel can start playing Throughput must be sufficient to stream the service to the user Data loss must be low otherwise some part of the broadcast will be missed (any two of these)
Calculate the cyclomatic complexity of the code extract in Table 1 below. Show briefly how you arrived at your answer.
The cyclomatic complexity is 1 (straight through) + 1 (for) + 1 (if) + 1 (&&) = 4.
In test driven development what steps do you need to carry out before you write the code that implements an operation.
Decide on code increment; decide on test; write the test, run the test assuming failure; and only then write the code
(a) Present two situations in which the use of agile development would not be recommended or would be difficult to implement.
(b) Present one situation in which agile developments would be easy to implement.
Agile is not recommended or is difficult to implement in the following situations
Heavily regulated environment – agile is not amenable to heavy regulated documentation
Predictability is more important than flexibility – agile values flexibility rather than predictability
Large software development with distributed teams – difficulty to scale has been a constant criticism of agile; distributed teams put a heavy burden on communication which so central to agile Requirements are well defined and unlikely to change
Customer is distant –agile demands close involvement of customer (any two of these)
Agile is easy to implement in the following situations
Requirements are constantly changing – agile deals with well with change
Developers and users can communicate regularly – agile demands close involvement of developers and users
The team is small, so that everyone can take part in a single stand-up meeting.
Team members are disciplined enough not to use “agile” as an excuse for cowboy coding (writing code according to their own rules disregarding what has been agreed by team).
Developers like being empowered. (any two of these)
One characteristic of a good software system is maintainability. Briefly
explain the meaning of this term
Maintainability is a software quality factor which determines how easily bugs can be found and fixed and how easily it can be adapted to meet its users’ changing needs.
Give two other characteristics of a good software system. You do not have
to explain them.
Other characteristics of good software system are it meets user’s needs, is useful, usable, reliable, flexible, afordable, avaliable, has low coupling
Consider the following non-functional requirement.
Only authorised staff shall be able to access the customer database.
(i) What category of non-functional requirement is it?
(ii) Suggest a suitable fit criterion for this requirement
A security requitement.
Fit criterion: No unauthorised staff shall be able to access the database.
Briefly explain the advantages of using a standard template, such as the
Volere template, for recording requirements.
Advantages of using a standard template for requirements capture (any 3):
- Systematic list of categories means we won’t overlook some.
- using a template avoids having to work out what to include each time.
- Everyone will know what information to expect so its helps communication amongst the developers.
- It makes it easier to compare projects.
- It may facilitate reuse of requirements.
Consider the following extract from a business description of a pizza delivery
service.
Once a customer has confirmed their order, a bill is generated for the
amount of the order. Customers will be able to pay by credit or debit card, or
by cash, although cash payment will be accepted only if the bill comes to
£15 or less.
From the description identify one business process and one business rule in
this domain.
Business process:
-General bill
Accept payments
Pay bil
Business rule:
-Cash is accepted only for bills of £15 or less.
(b) Give one way in which business rules can be represented.
(1 mark)
(c) Business processes can be represented as UML activity diagrams. What is
the advantage of dividing the activities amongst swimlanes?
(b) Ways a business rule can be represented (one asked for)
- In natural language
- Using OCL
- Using constraints or prea- and post conditions.
- Using multiplicities, range of attribute valus, in UML
(c) Swimlanes make it clear whi is responsible for each step.