Uploaded by naingaunglu01

Requirement-Engineering

advertisement
Requirement Engineering II
CS-2107
- Total 25 questions
Chapter-7 (Requirements Definition and Specification)
1. Discuss the problems of using natural language for requirements
specification and show using small examples, how structuring natural
language into forms can help avoid some of these difficulties.
Various problems can arise when requirements are written in natural
language sentences, in a text document:
Lack of clarity It is sometimes difficult to use language in a precise and
unambiguous way without making the document wordy and difficult to read.
Requirements confusion Functional requirements, non-functional
requirements, system goals and design information may not be clearly
distinguished.
Requirements amalgamation Several different requirements may be
expressed together as a single requirement.
Natural language is often used to write system requirements
specifications as well as user requirements. However, because system
requirements are more detailed than user requirements, natural language
specifications can be confusing and hard to understand:
I.
Natural language understanding relies on the specification readers
and writers using the same words for the same concept. This leads to
misunderstandings because of the ambiguity of natural language.
II.
A natural language requirements specification is over flexible. You
can say the same thing in completely different ways. It is up to the
reader to find out when requirements are the same and when they
are distinct.
III. There is no easy way to modularize natural language requirements. It
may be difficult to find all related requirements. To discover the
consequence of a change, you may have to look at every requirement
rather than at just a group of related requirements.
Because of these problems, requirements specifications written in
natural language are prone to misunderstandings. These are often not
discovered until later phases of the software process and may then be very
expensive to resolve.
This is a requirement specification written in natural language.
The editor shall provide a facility where users can add nodes of a
specified type to a design. Nodes are selected when they are added to the
design.
Structuring natural language into form
Function
Add node
Description
Adds a node to an existing design. When added to the
design, the node becomes the current selection.
Input
Node type, Node position, Design identifier
2. Discover ambiguities or omissions in the following statement of
requirements for part of a ticket issuing system.
A ticket issuing system is intended to automate the sale of rail tickets.
Users select their destination, and input a credit card and a personal
identification number. The rail ticket is issued and their credit card account
charged with its cost. When the user presses the start button, a menu display
of potential destinations is activated along with the message to the user to
select a destination. Once a destination has been selected, users are
requested to input their credit card. Its validity is checked and the user is then
requested to input their credit card. Its validity is checked and the user is then
requested to input a personal identifier. When the credit transaction has been
validated, the ticket is issued.
Ambiguities and omissions include:
a) Can a customer buy several tickets for the same destination together
or must they be bought one at a time?
b) Can customers cancel a request if a mistake has been made?
c) How should the system respond if an invalid card is input?
d) What happens if customers try to put their card in before selecting a
destination (as they would in ATM machines)?
e) Must the user press the start button again if they wish to buy another
ticket to a different destination?
f) Should the system only sell tickets between the station where the
machine is situated and direct connections or should it include all
possible destinations?
3. Rewrite the above description using the structured approach. Resolve
the identified ambiguities in some appropriate way.
Function - Give customer a rail ticket and charge credit
account accordingly
Description - Determine customer’s destination, calculate the
charge for the trip, and charge the customer the appropriate
amount. If charge is complete, print the ticket, otherwise,
print no ticket, and report error to customer.
Input – Destination, credit card number, personal ID number
Outputs – Tickets, error messages
Actions - Ask the customer for their destination, when the
input,
calculate the total, and prompt for swiping of a credit card, prompt
customer for PIN, prompt customer that the transaction is taking place,
if successful print the ticket and return to start state, if unsuccessful,
ask customer to swipe their card again and re-input the PIN. If
unsuccessful again, prompt that the transaction has failed, and return to
start state.
Requires – Destination, credit card number, and PIN
Pre-condition- None
Post-condition- None
Side effects- Charge to the customer’s credit account
4. Using the technique suggested here where natural language is presented
in a standard way, write a plausible requirements definition for the
following functions:
a) An unattended petrol(gas) pump system which includes a credit
card reader. The customer swipes the card through the reader
then specifies the amount of fuel required. The fuel is delivered
and the customer’s account debited;
The user shall be prompted to swipe their credit card, and
enter their PIN. Upon verification of the card, the user shall be
prompted to select the octane level of their fuel. And enter a
desired amount requested in dollars. Pumping shall be unlocked
until the fuel-cutoff is engaged, or the predetermined amount of
money worth of has been deployed. In the event of the fuel cutoff
engaging, any remaining money shall be refunded to the user’s
credit account
b) The cash dispensing function in a bank auto-teller machine;
A user shall enter their bank card in the slot provided.
Following the appropriate prompts for a cash withdrawal, the user
shall enter the requested amount. If the amount requested is not
greater than the amount in the account, cash shall be dispensed,
and the card shall be returned.
c) The spell checking and correcting function in a word processor.
When the user enters a word, separated by any white space
or punctuation, the spelling of said word shall be checked against
an existing database. If the world is not found, the user shall be
notified that the word is incorrect. If the user so chooses to
correct the misspelled word, a list of closely matched words shall
be provided for the user. If the users chooses a word given, it shall
be replaced and the notification of the misspelled word shall be
removed.
5. Describe three different types of non-functional requirement which may
be placed on a system. Give examples of each of these different types of
requirement.
Three different types of non-functional requirement which may be
placed on a system. They are –
1) Product requirements
❖ Requirements which result from the need for the delivered
product to behave in a particular way.
❖ This type of non-functional requirement may be derived
directly form user needs.
❖ Examples include requirements on how fast the system must
execute and how much memory it requires; Others :
reliability, portability
2) Organizational requirements
❖ Requirements which are consequence of organizational
policies and procedures.
❖ Organizational requirements may be derived from both
the customer’s and the developer’s organization.
❖ Examples include process standards which must be
used;
❖ Implementation requirements such as the programming
language or design method used
3) External requirements
❖ Covers all requirements which arise from factors
external to the system and its development process.
❖ These include interoperability requirements which
define how the system interacts with systems in other
organizations. Others : Legislative requirements,
ethical requirements
6. Write a set of non-functional requirements for the ticket issuing system
described above, setting out its expected reliability and its response
time.
Performance requirements where the system shall respond to user
inputs to provide tickets and charge accounts in a timely manner.
Usability requirement where the system shall continue to the series of
function from rolling of ticket paper to calculating the appropriate fee
and prompting the user to input their card.
Reliability requirement as the unit shall verify that the card is a
credit card and is valid, and has sufficient credit to be charged. Upon
successful verification, the unit shall print a ticket, and return to its
ready state, for the next transaction to take place.
The reliability this system relies on the durability to the physical
user interface, the network connection in the area the system is placed,
the size of the ticket rolls that the unit can accept, and the mechanism
for dispensing the tickets
7. Suggest how an engineer responsible for drawing up a requirements
specification might keep track of the relationships between functional
and non-functional requirements.
Keeping track of the relationships between functional and nonfunctional requirements is difficult because non-functional requirements
are sometimes system level requirements rather than requirements
which are specific to a single function or group of functions. One
approach that can be used is to explicitly identify system-level
nonfunctional requirements that are associated with a functional
requirement and list them separately. All system requirements that are
relevant for each functional requirement should be listed. They can be
related by including them in a table as shown below.
Functional requirement
Related non-functional N o n - f u n c t i o n a l
requirements
system requirements
The system shall provide
an operation which
allows operators to open
the release valve to vent
steam into the
atmosphere.
Safety requirement:
No release of steam shall
be permitted if
maintenance work is
being carried out on any
steam generation plant.
Timing requirement:
The valve must open
completely within 2
seconds of the operator
initiating the action.
8. You have taken a job with a software user who has contracted your
previous employer to develop a system for them. You discover that your
company’s interpretation of the requirements is different from the
interpretation taken by your previous employer. Discuss what you should
do in such a situation. You know that the cost to your current employer
will increase if the ambiguities are not resolved. You also have a
responsibility of confidentiality to your previous employer.
The key here is the ambiguities, there is nothing illegal about
resolving the interpretation of ambiguities. I will discuss the ambiguities
and email a bullet pointed listed to the specific ambiguities and
recommendations to current employer specific decision maker.
Chapter-8 (Software Prototyping)
1. You have been asked to investigate the feasibility of prototyping as a
standard part of the software development process in your
organization. Write a report for your manager discussing the classes of
project where prototyping should be used and setting out the
expected costs and benefits from using prototyping
A software prototype is not normally intended for design validation
but to help develop and check the real requirements of the system. The
prototype design is often quite different from that final system.
One way to view prototyping is as a technique of risk reduction. A
significant risk in software development is requirements errors and
omissions. The costs of fixing requirements errors at later stages in the
process can be very high. Experiments have shown that prototyping
reduces the number of problems with the requirements specification and
the overall development costs may be lower if a prototype is developed.
The benefits of developing a prototype early in the software
process are(1) Misunderstanding between software developers and users may
be identified as the system functions are demonstrated.
(2) Missing user services may be detected.
(3) Difficult to use or confusing user services may be identified and
refined.
(4) Software development staff may find incomplete and/or
inconsistent requirements as the prototype is developed.
(5) A working, albert limited, system is available quickly to
demonstrate the feasibility and usefulness of the application to
management.
(6) The prototype serves as a basic for writing the specification for
a production quality system.
2. Explain why for large systems development, it is recommended that
prototypes should be ‘throw-away’ prototypes.
Large systems usually have a long lifetime, so maintainability is an
important issue. Since prototypes generally undergo many changes during
development, the resultant loss in design integrity can make
maintenance very difficult.
‘Throw away’ prototyping model is especially useful when the
project needs are unclear and poorly laid out. It functions by providing
proof that something can indeed be done in terms of systems and
strategies. So that ‘throw away’ is used for certain projects and will
eventually be discarded after the project has been complete. It is also
known as close-ended prototyping.
3. What features of languages like Smalltalk and Lisp contribute to their
support of rapid prototyping?
These languages are generally interpretive to support incremental
development, and are type-less. They are also generally associated with
powerful support environments providing large libraries of reusable
functions, GUI tools, powerful debuggers, etc.
4. Under what circumstances would you recommend that prototyping
should be used as a means of validating system requirements?
When developing a system that is new or unfamiliar to stakeholders, and whenever there are significant requirements issues that are
best resolved by evaluating a concrete system model. Moreover, if your
development model is a rapid application development, then,
prototyping should be used. As staff costs are the principal software
costs, rapid development means that prototype costs are minimized.
5. There are particular difficulties in prototyping real-time embedded
computer system. Suggest what these might be and purpose ways of
resolving the difficulties.
The problem in prototyping real-time embedded system is that
such systems must often interact with hardware which may be
unavailable, having timing requirements which cannot be replicated in
the prototyping language and have very high reliability requirements.
The process structure may also have to be prototyped and this may be
impossible if the prototyping language does not include concurrent
programming facilities.
These problems can be partially addressed by prototyping the
hardware using a simulator, and by using a model of time which
corresponds to real-time but which is many time slower.
6. A software manager is involved in a project development of a software
design support system which is intended to assist with the translation
of software requirements to a formal software specification. The
system must run on a personal computer but may be developed on
another system and ported to that machine.
Three possible development strategies are:
a) Develop a throw-away prototype using a prototyping language such
as Smalltalk. Evaluate this prototype then review requirement.
Develop the final system using C and X-windows.
b) Develop the system from the existing requirements using C and Xwindows then modify if to adapt to any changed user requirements
c) Develop the system using evolutionary prototyping with a
prototyping language such as Smalltalk. Modify the system
according to the user’s requests and deliver the modified
prototype.
Comment on the advantages and disadvantages of each of these
development strategies.
(a)
Throw-away prototyping
❖ Fast development and rapid feedback from users
❖ Likely to result in reasonable requirements
❖ Need multiple development languages.
❖ Cost more
(b)
Develop using Card X-windows
❖ Fewer problems with training.
❖ Known management strategy
❖ Requirements likely to be wrong so needs postdelivery modification.
(c)
Evolutionary prototyping
❖ Fast feedback from users.
❖ Rapid system delivery.
❖ Readily adapted to evolving requirements
❖ Hard to manage
❖ Lack of standards for portability etc.
❖ Likely to be unstructured causing future maintenance
problems.
7. Discuss prototyping using reusable components and explain the
problems which arise using this approach.
The time needed to develop a system can be reduced if many parts
of that system can be reused rather than designed and implemented.
Prototypes can be constructed quickly if you have a library of reusable
components and some mechanism to compose these components into
systems.
Prototyping with reusable components involves developing a
system specification by taking account of reusable components are
available. These components are then taken from a repository and put
together to form the prototype system. This approach is usually most
suitable for throw-away prototyping as the specification may not be
exactly what is required.
However prototyping using reusable components is limited because
the quality of the software components is relatively crude. The function
of the individual components is often too general-purpose to combine
effectively with other components.
8. You have developed a throw-away prototype system for a client who is
very happy with it. However, she suggests that there is no need to
develop another system but that you should deliver the prototype and
offer an excellent price for it. You know that that three may be future
problems with maintaining the system. Discuss how you might respond
to this customer.
The problem which you are likely to face here is that customers
have immediate requirements for a system and may be willing to accept
long-term costs in return for short-term advantage. In the long-term, the
prototype is likely to be much more expensive to maintain and may not
be reliable as a properly-engineered system. Customers should always be
able to have what they are willing to pay for and. If there is no financial
loss to the developer, there are no problems in delivering the prototype.
However, as a professional, it is important that you make clear the
problems which the customer is likely to face with the system and
emphasize that the system was intended as a demonstrator rather than a
finished system. You may wish to draw up some written agreement where
you make clear that you do not take responsibility for system problems.
Chapter-7 ( Requirements engineering processes)
1. Suggest who might be stakeholders in a university student records
system. Explain why it is almost inevitable that the requirements of the
different stakeholders will conflict in some way.
The stakeholders in a student records system include:
❖ University central administration including those responsible for
registration, payment of fees, examinations and assessment and
graduation.
❖ The students whose details are recorded in the system.
❖ University departmental administrators who supply information to
the system and use information from it.
❖ Academic staff who use information from the system.
❖ Data protection officers (local and national)
❖ Potential employers of students (who may require information from
the system).
The requirements that stakeholders have will conflict in various
ways, as different people have different proprieties, and some of the
stakeholders who influence the design of the system more than others
may not know exactly what they really want and need. In the student
records system, the requirements of the students may be something
like they want to see at any given time what classes are remaining in
their curriculum, and the government officials may want to see at any
given time the hours of the courses already taken. In an extremely
simply records system, these would conflict with each other, and
would need each to be built upon to meet the requirements of both
parties.
2. A software system is to be developed to manage the records of patients
who enter a clinic for treatment. The records include records of all
regular patient monitoring(temperature, blood, pressure, etc.),
treatments given, patient reactions and so on. After treatment, the
records of their stay are sent to the patient’s doctor who maintains their
complete medical record. Identify the principle viewpoints which might
be taken into account in the specification of this system and organize
these using a viewpoint hierarchy diagram.
Viewpoints:
1. Indirect
1.1. Patient’s doctor (out of clinic)
2. Direct
2.1. Staff monitoring a patient
2.2. Curing doctor
2.3. Staff accepting a patient
3. Domain
3.1 Regulations on how to make patient’s records
3. The LIBSYS system has to include support for cataloguing new documents
where the system catalog may be distributed across several machines.
What are likely to be the most important types of non-functional
requirements associated with the cataloguing facilities?
The more important types of non-functional requirements would be those
relating to the replication of data of the entire system, to the individual
machines. Keeping the data consistent and congruent in the entire system
would be one of the top goals of the system, as redundancies and omissions
could be highly likely in a distributed environment.
4. Using your knowledge of how an ATM is used, develop a set of use-cases
that could serve as a basis for understanding the requirements for an
ATM system.
i. The user is prompted to enter a card
ii. The user enters their card
iii. The user is prompted to enter their PIN
iv.
v.
vi.
vii.
The user enters their PIN
The user is prompted to withdraw or check balance
The balance is displayed
If withdraw is chosen, the user is prompted to enter the amount to be
withdrawn.
viii. If withdraw is chosen, the amount is compared with the balance, and if
enough money is available, the money is dispensed
ix. If withdraw is chosen, the user is prompted to take the dispensed money
x. The user is prompted to take their card
xi. All transactions are complete, and display a happy message for the user.
5. Discuss an example of a type of system where social and political factors
might strongly influence the system requirements. Explain why these
factors are important in your example.
A 24/7 monitoring system to the public may involve social and political
factors. The primary objective of this system is to monitors the terrorist and
violence. Depends on your culture and your citizen’s belief, this system has lots
of issues like who will be monitor, is the system secure enough and the system
data confidentiality. Some political factors like does this system violate the
public’s human right or does this system threaten the civilization might be
strongly influence.
6. Who should be involved in a requirements review? Draw a process model
showing how requirements review might be organized.
The primary stakeholders should be involved in the requirements review, as
well as those involved with the development of the system, and the project
managers who are in charge of the budget and scheduling of the system.
7. Why do traceability matrices become difficult to manage when there are
many system requirements? Design a requirements structuring
mechanism, based on viewpoints, which might help reduce the scale of
this problem.
Traceability matrices become difficult to manage when there are many
system requirements for the following factors as source traceability
information, requirements traceability and the design traceability are depend
on the system requirements.
1. Source traceability information links the requirements to the stakeholders
who proposed the requirements. When a change is proposed, you use this
information to find and consult the stakeholders about the change.
2. Requirements traceability information links dependent requirements within
the requirements document.
3. Design traceability information links the requirements to the design
modules where these requirements are implemented.
8. When emergency changes have to be made to systems, the system
software may have to be modified before changes to the requirements
have been approved. Suggest a process model for making these
modifications that ensures that the requirements document and the
system implementation do not become inconsistent.
The following diagram shows a change process that may be used to
maintain consistency between the requirements document and the system. The
process should assign a priority to changes so that emergency changes are
made but these changes should then be given priority when it comes to making
modifications to the system requirements. The changed code should be an
input to the final change process but it may be the case that a better way of
making the change can be found when more time is available for analysis.
9. Your company uses a standard analysis method that is normally applied in
all requirements analyses. In your work, you find that this method
cannot represent social factors that are significant in the system you are
analyzing. You point this out to your manager, who makes it clear that
the standard should be followed. Discuss what you should do in such a
situation.
Download