Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach

web.firat.edu.tr
from web.firat.edu.tr More from this publisher
21.08.2013 Views

4.5 The requirements specification 41 enriching their jobs. They may resent any attempt to speed up or intensify their work. They may object to any facilities in the system to monitor their work rate. The management in the bank, however, will probably be concerned with costs, performance and effectiveness. There may very well be a conflict of interest between the cashiers and the managers. This paints an extreme picture, but illustrates that the users will not necessarily present a single, uniform view. Another example of a potential gulf between users and analysts is to do with the level of expectation of users. Some users have seen science fiction films and come to believe that computers can do anything – or at least can offer a high level of artificial intelligence. Others, perhaps, are naive in the opposite direction and believe that computers can carry out only the most mundane tasks. To sum up, the role of the analyst is: ■ to elicit and clarify the requirements from the users ■ to help resolve possible differences of view amongst the users and clients. ■ to advise users on what is technically possible and impossible. ■ to document the requirements (see the next section). ■ to negotiate and to gain the agreement of the users and clients to a (final) requirements specification. The journey from the users’ initial idea to an agreed requirements specification will often be long and tortuous. 4.5 ● The requirements specification The end product of requirements elicitation and analysis is the requirements specification. It is a vital piece of documentation that is crucial to the success of any software development project. If we cannot precisely state what the system should do, then how can we develop the software with any confidence, and how can we hope to check that the end product meets its needs? The specification is the reference document against which all subsequent development is assessed. Three important factors to be considered are: 1. the level of detail 2. to whom the document is addressed 3. the notation used. The first factor is about the need to restrict the specification as much as possible to specify what the system should do rather than how it should do it. As we have seen, the specification should ideally be the users’ view of the system rather than anything about how the system is to be implemented. The second factor arises because the specification has to be understood by two different sets of people – the users and the developers. The people in these two sets have different backgrounds, expertise and jargon. They share the common aim of clearly

42 Chapter 4 ■ Requirements engineering describing what the system should do, but they will each be inclined to use a different language. The users will have a preference for non-technical descriptions expressed in natural language. Unfortunately, while natural language is excellent for poetry and love letters, it is a poor vehicle for achieving a precise, consistent and unambiguous specification. On the other hand, the analysts, being of a technical orientation, will probably want to use precise (perhaps mathematical) notation in order to specify a system. This brings us to the question of the notation. Several notations are available for writing specifications: ■ informal, writing in natural language, used as clearly and carefully as possible. In this chapter we will concentrate on this approach. ■ formal, using mathematical notation, with rigor and conciseness. This approach is outside the scope of this book. Formal methods tend to be used only in safety critical systems. ■ semi-formal, using a combination of natural language together with various diagrammatic and tabular notations. Most of these notations have their origins in methods for software design, that is, in methods for the implementation of software. Thus there is a potential problem of including information about the implementation. These notations are discussed later in this book and include pseudo-code, data flow diagrams and class diagrams. At the present time, most requirements specifications are written in natural language, assisted by use case diagrams. One approach is to draw up two documents: 1. a requirements specification written primarily for users, describing the users’ view of the system and expressed in natural language. This is the substance of the contract between the users and the developers. 2. a technical specification that is used primarily by developers, expressed in some more formal notation and describing only a part of the information in the full requirements specification. If this approach is adopted, there is then the problem of ensuring that the two documents are compatible. 4.6 ● The structure of a specification Given that a requirements specification will usually be written in natural language, it is useful to plan the overall structure of the specification and to identify its component parts. We can also identify those ingredients that, perhaps, should not be included at all, because they are concerned with the implementation rather than the requirement. The remainder of this section presents one way of structuring specifications. One approach to giving a clear structure to a specification is to partition it into parts. Software essentially consists of the combination of data and actions. In specifications,

42 Chapter 4 ■ Requirements engineering<br />

describing what the system should do, but they will each be inclined to use a different<br />

language. The users will have a preference <strong>for</strong> non-technical descriptions expressed in<br />

natural language. Un<strong>for</strong>tunately, while natural language is excellent <strong>for</strong> poetry and love<br />

letters, it is a poor vehicle <strong>for</strong> achieving a precise, consistent and unambiguous specification.<br />

On the other hand, the analysts, being of a technical orientation, will probably<br />

want to use precise (perhaps mathematical) notation in order to specify a system. This<br />

brings us to the question of the notation.<br />

Several notations are available <strong>for</strong> writing specifications:<br />

■ in<strong>for</strong>mal, writing in natural language, used as clearly and carefully as possible. In<br />

this chapter we will concentrate on this approach.<br />

■ <strong>for</strong>mal, using mathematical notation, with rigor and conciseness. This approach is<br />

outside the scope of this book. Formal methods tend to be used only in safety critical<br />

systems.<br />

■ semi-<strong>for</strong>mal, using a combination of natural language together with various diagrammatic<br />

and tabular notations. Most of these notations have their origins in<br />

methods <strong>for</strong> software design, that is, in methods <strong>for</strong> the implementation of software.<br />

Thus there is a potential problem of including in<strong>for</strong>mation about the implementation.<br />

These notations are discussed later in this book and include pseudo-code, data<br />

flow diagrams and class diagrams.<br />

At the present time, most requirements specifications are written in natural language,<br />

assisted by use case diagrams.<br />

One approach is to draw up two documents:<br />

1. a requirements specification written primarily <strong>for</strong> users, describing the users’ view<br />

of the system and expressed in natural language. This is the substance of the contract<br />

between the users and the developers.<br />

2. a technical specification that is used primarily by developers, expressed in some<br />

more <strong>for</strong>mal notation and describing only a part of the in<strong>for</strong>mation in the full<br />

requirements specification.<br />

If this approach is adopted, there is then the problem of ensuring that the two documents<br />

are compatible.<br />

4.6 ● The structure of a specification<br />

Given that a requirements specification will usually be written in natural language, it is<br />

useful to plan the overall structure of the specification and to identify its component<br />

parts. We can also identify those ingredients that, perhaps, should not be included at<br />

all, because they are concerned with the implementation rather than the requirement.<br />

The remainder of this section presents one way of structuring specifications.<br />

One approach to giving a clear structure to a specification is to partition it into parts.<br />

<strong>Software</strong> essentially consists of the combination of data and actions. In specifications,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!