Software Engineering
Dr Kingsley Sage
Copyright By PowCoder代写 加微信 powcoder
Requirements engineering
• Functional and non-functional requirements
• Software requirements document
• Requirements specification
• Requirements engineering process
• Elicitation and analysis
• Validation
• Requirements management
Requirements engineering
• The process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed
• The requirements themselves are the descriptions of the system services and the constraints that are generated during the requirements engineering process
What is a requirement?
• Could be quite a high level abstract statement of a detailed mathematical description
• Describes some useful aspect of what we wish to achieve
• Could for the basis for a legal contract and thus form part of a set of contractual undertakings
– E.g. “The building shall be made of 1m thick concrete of mix type A as detailed in the appendix”
– That’s what we want and that could be a binding undertaking in a contract
Requirements abstraction
• A quote from Davis:
– “If a company wishes to let a contract for a large software development project, it must define its needs in a sufficiently abstract way that a solution is not pre- defined. The requirements must be written so that several contractors can bid for the contract, offering, perhaps, different ways of meeting the client organization’s needs. Once a contract has been awarded, the contractor must write a system definition for the client in more detail so that the client understands and can validate what the software will do. Both of these documents may be called the requirements document for the system.”
Requirements abstraction
• What does this really mean?
• Compare these two “requirements” received directly from a customer (user requirement)
– “The software shall be written using Visual Basic so that it can run on a PC” [Rv1]
– “The software shall be written in a language that can run on a PC” [Rv2]
• What’s the difference between these two and why is Rv1 potentially a problem if given to us by the customer?
Requirements abstraction
• Don’t do the contractor’s job for them
– What you might not realise is that the customer actually doesn’t really “PC”, they mean a “desktop computer”, including those with Mac OS, Windows, Linux …..
– So using Visual Basic is a misconception on the part of the customer and could come as a nasty shock later
• Also, if we are too specific, all those who bid for the contract are likely to give you about the same price
• Where is the incentive to ask questions and innovate?
Requirements abstraction • So, as Davis has suggested:
– State WHAT you want to achieve – NOT HOW it is to be done
• There are exceptions, but this is a good general rule
• So how did the Watson Games team do in telling you their requirements?
Types of requirement
• User requirements
– Expressed by the end user in their own words. Written by the end
– This is the document you have from Watson Games
– Can be vague at times, incomplete, plain mis-guided
– Like Rv1
• System requirements
– A structure document that lays out detailed descriptions of the system services and operational constraints. Will ultimately form part of a contractual relationship between end user and developer
– Should have clarity and precision
– Like Rv2
• User requirements give rise to system requirements, not the other way around
An example
Who reads this stuff anyway …
Functional, non-functional and
domain requirements
• Functional
– Services the system needs to provide, how it should react to particular inputs and how to behave in a particular situation
• Non-functional
– Constraints such as languages, standards, timings
– Things to do with the environment in which this system will operate, and issues that we may not exactly have a full understanding of
Functional requirements
• Some examples
– “The software shall detect whether the ambient environment has exceeded 20°C for longer than the last 2 consecutive minutes and activate function B if that situation occurs”
– “If function B is activated, processing on node X shall be suspended until a human operator verifies that the process is safe to continue using the safety button on the master control panel”
• Specific
• Measurable • Achievable • Realistic
The SMART / dumb balance …
• What do you think of these as part of the spec of a system to manage medical appointments:
– A user shall be able to search the appointments lists for all clinics
– The system shall have a contemporary user interface
– A user shall be able to display all free appointment slots for a specific clinic by selecting the clinic from a system generated list of all clinics in the health provider area and selecting the day, including the current day if required
Would you want to be responsible
for delivering these?
What does “search” mean in this context? What is a “contemporary user interface”?
A bit like asking friends to come around your house to entertain you (as a requirement) and then being disappointed when this happens:
Completeness and consistency
• Requirements should be:
– Complete: tell us everything we need to know – Consistent: not contradict ourselves
• In practice: almost impossible to achieve
Non-functional requirements
• These define system properties and constraints such as:
– Reliability
– Response time
– Storage requirements
• Many also mandate a particular IDE, programming language or development method
• In some ways, may be more critical than functional requirements. If the NF requirements are not met, the system may actually be useless
Non-functional requirements
Non-functional requirements
• There is also a possible interconnection between NF requirements and functional requirements
• E,g. a NF requirement might emphasise the need for secure access to a system
• This in turn gives rise to specific functional requirements such as:
– The system shall be accessed by means of a five digit passcode
– Each passcode shall be unique to each operator
– And so on …
Goals vs requirements
• Consider this example:
– The system should be easy to use by medical staff and should be organised in such as way that user errors are minimised (desirable NF requirements, rather vague and an aspiration or goal)
– Medical staff shall be able to use all of the system functions after four hours of training. After this training, the average number of errors made by experience users shall not exceed two per hour of system use (that’s a SMART mandatory non-functional requirements)
Specifying non-functional requirements
Domain requirements
• Requirements that are trying to tell us something, but are not yet expressed in a manner that allows us to draw up meaningful functional or non- functional requirements
• For example: “the train control system has to take into account the braking characteristics in different weather conditions”
• What do we need to do to take this domain requirements into account
Domain requirements
• Probably an expression of something that requires expert knowledge or experience to translate into something meaningful
• Domain requirements need to be translated into meaningful functional and non-functional requirements
• So go and find a train braking expert and ask them what on earth this domain requirement is all about
Domain requirements
• Understandability
– Domain requirements are expressed in the language of the application domain/customer/end user
– And not necessarily understood by software engineer developing the system
– Can you think of any examples of this from the coursework user requirements?
– After all, it was written by “board games specialists”, not software engineers
• Implicitness
– The domain specialists may have just assumed we understood what they are talking about
Key points
• Understand the difference between: – User requirements
– Functional requirements
– Non-functional requirements
– Domain requirements
– They form a key document in the development of a software product
– It defines its very essence
– And it forms your first major challenge in your coursework teams
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com