0% found this document useful (0 votes)
16 views8 pages

Answers Chapter 6 - Software Engineering

This document presents exercises on software requirements. It defines four types of requirements: functional, non-functional, domain, and product. It also discusses the problems of natural language in defining requirements and how structuring them helps. Then, it identifies ambiguities in a requirements description for a train ticket sales system and rewrites the description in a structured manner. Finally, it proposes requirements for ATM systems and processors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

Answers Chapter 6 - Software Engineering

This document presents exercises on software requirements. It defines four types of requirements: functional, non-functional, domain, and product. It also discusses the problems of natural language in defining requirements and how structuring them helps. Then, it identifies ambiguities in a requirements description for a train ticket sales system and rewrites the description in a structured manner. Finally, it proposes requirements for ATM systems and processors.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Software Engineering

CHAPTER 6 - Software Requirements


EXERCISES
6.1 Identify and briefly comment on four types of requirements that can be defined for
a computer system.
Functional requirements. They are statements of the services that must be provided by the
system, how it should react to particular inputs and how it
must behave in particular situations. In some cases, the requirements
functionalities of the systems can also explicitly declare what the system does not
must do.
Non-functional requirements. They are constraints on the services or functions offered.
by the system. They include time constraints, regarding the development process and
standards. Non-functional requirements are often applied to the system in its
totality. Normally, they are seldom applied to individual characteristics or services of the
system.
Domain requirements. These are requirements that come from the domain of
application of the system that reflects the characteristics and constraints of that domain.
They can be functional or non-functional.
Product requirements. These requirements specify the behavior of the
product. Some examples are the performance requirements regarding speed.
system execution and how much memory is required; the reliability requirements that
set the failure rate so that the system is acceptable; the requirements of
portability, and the requirements of usability.

6.2 Comment on the problems of using natural language to define requirements


of the user and of the system, and show, using small examples, how to structure the
Natural language in forms can help avoid some of these difficulties.
Various problems can arise when writing with phrases in natural language in a
text document:
Lack of clarity. Sometimes it is difficult to use language precisely and not
ambiguous without making the document less concise and difficult to read.
Confusion of requirements. The requirements are not clearly distinguished.
functional and non-functional, the system goals and the information for the design.
Conjunction of requirements. Various different requirements can be expressed by
jointly as a single requirement.
If user requirements are being drafted, jargon should not be used.
software, structured or formal notations, or describe the requirements by the
Description of the system implementation. It should be written in simple language.
simple tables and forms and intuitive diagrams.
Software Engineering
Software Engineering

6.3 Identify the ambiguities or omissions in the following requirements statement of a


part of a bill dispensing system.
An automatic ticket vending machine sells train tickets. Users select
your destination and enter a credit card and a personal identification number. The ticket
of the train is issued and charged to the credit card account. When the user presses the
pressing the home button activates a menu that shows the possible destinations, along with a message to
the user is prompted to select the destination. Once a destination has been selected, it
ask users to enter their credit card. Its validity is checked and then it
It asks him to enter a personal identifier. When the credit transaction has been validated, it
issues the ticket.
Can a customer buy several tickets for the same destination together or must they be separate?
buy one at a time?
Can customers cancel a request if an error has been made?
How should the system respond if an invalid card is entered?
What happens if customers try to enter their card before selecting a destination?
(as they would do in ATMs)
Should the user press the start button again if they wish to buy another ticket to
a different destination?
Does the system only sell tickets between the station where the machine is located and
Should the direct connections include all possible destinations?

6.4 Rewrite the previous description using the structured approach described in this.
chapter. Appropriately resolve the identified ambiguities.
Function Issue train tickets
Description An automatic ticket vending system sells tickets for
train
Entries Identificación personal (DNI), destino, origen, tarjeta de crédito
Source Source: Memory readings of the system's location
automatic
Outputs Ticket
Action If all the data is entered correctly and when the card
Once credit has been validated, the ticket is issued.
Requirements None
Precondition None
Postcondition Your credit card account is charged.
Side effects None

6.5 Draw a sequence diagram that shows the actions carried out in the system.
ticket dispenser. You can make some reasonable assumptions about the system. Put
special attention to the specification of user errors.
Software Engineering
Software Engineering

6.6 Using the technique suggested here, in which natural language is presented in a form
standard, draft plausible user requirements for the following functions:
The function of dispensing money at an ATM of a bank.
Cash dispenser
1.1. The system must provide an installation that allows issuing a specific amount of
cash to the clients. The client requests the amount, but the system can reduce this amount if
the client's daily limit or the overdraft limit is reached.
1.1.1. The sequence of actions to dispense cash must be:
The customer enters the required amount of cash
The system verifies this with the daily limits of the card and the overdraft limit.
of the client.
3. If the amount violates any of these limits, a message is issued informing you of this.
customer of the maximum allowed amount and the transaction is canceled.
4. If the amount is within the limits, the requested cash should be disbursed.
5. The customer's account balance and the daily card limit must be reduced by the
amount of cash dispensed.
Specification: ATM / Client Functionality / FS. Section 2.1

The spell check and correction function in a word processor.


1. Spelling correction
1.1. The system will provide a user-activated function that checks the spelling of
the words in the document against the spelling in the system dictionary and the
dictionaries provided by the user.
1.2. When a word is found in the document that is not in any dictionary, it
must issue a user query with the following options:
1. Ignore this instance of the word
2. Ignore all instances of the word
3. Replace the word with a suggested word from the dictionary
4. Replace the word with text provided by the user
5. Ignore this instance and add the word to a specific dictionary.
6. When a word that is not in the dictionary is discovered, the system should suggest 10.
alternative words based on a match between the found word and those of the
dictionaries.
Specification: NewWP / Tools / FS. Section 7.2

A self-service gasoline pump system that includes a card reader.


credit. The customer swipes the card through the reader and specifies the amount of
required fuel. This is delivered and charged to the customer's account.
Fuel delivery system
1.1. The system must provide an unattended fuel delivery service where
It delivers a specific amount of fuel to customers. The cost is deducted from the account.
from the customer's credit card.
1.2. The sequence of actions to dispense fuel must be:
The customer selects the type of fuel to be delivered.
The client enters a cash limit or a maximum amount of fuel to be delivered.
3. The customer validates the transaction by providing card account details.
Software Engineering

credit.
Justification: The allowed amount of fuel depends on the credit limit, but
customers may want to 'fill' instead of having a specific amount of
combustible. By specifying a maximum, the system can verify if the credit is
available. Please note that the definition does not specify how they should be provided
the credit card details.
4. The pump is activated and fuel is delivered, under the customer's control.
5. The transaction is finalized when the nozzle of the pump is returned to its case for 15
seconds or when the fuel or cash limit of the customers is reached.
Justification: The termination should not be immediate when the nozzle is returned, since
that the customer may want to restart the transaction, e.g. to fill a can of
fuel and the car's fuel tank. If there is a pump screen
available, it may be appropriate to issue a message 'Please wait for your receipt'.
A receipt is printed for the customer.
The fuel stock is updated.
Specification: PUMP_SYS / FS. Section 1

6.7 Describe four types of non-functional requirements that may exist in a system. Give
examples of each of these types of requirements.
Requirement no Description Example
functional
Performance Set of performance requirements The system must process at least 150
outside the limits of the performance transactions per second.
expected from the system. These
they can be expressed in different The maximum response time for the
forms depending on the type of any user's request must be
system, for example. number of of 2 seconds.
transactions processed by
second, user response time
requests, etc.

Implementation Define specific standards or The system design must be developed.


methods that should be used in using an oriented approach to
the development process for the objects based on the UML Process.
system
The system must be implemented in C +
+,
Version 3.0

Usability Define the requirements that are All operations that are
they are related to usability of the potentially destructive must
system for end users. include an undo function that
allow users to revert their
action.

All operations that are


potentially destructive must
highlight in red in the interface of
system user.

Security The security requirements refer to The system must be certified by


Software Engineering

the general safe operation of the system. agreement with Health Regulations and
Security XYZ 123.
6.8 Redacte un conjunto de requerimientos no funcionales para el sistema expendedor de billetes,
specifying your skill and your response time.
The possible non-functional requirements for the ticket issuance system include:
1. Between 06:00 and 23:00 on any day, the total system downtime must not exceed
the 5 minutes.
2. Between 06:00 and 23:00 on any day, the recovery time after a system failure
must not exceed 2 minutes.
3. Between 11:00 PM and 6:00 AM on any day, the total system downtime must not exceed
the 20 minutes.
All of these are availability requirements; please note that they vary depending on the time of day.
The failures when most people travel are less acceptable than the failures when
there are few customers.
4. After the customer presses a button on the machine, the screen must update in 0.5
seconds.
5. The ticket issuance time after receiving the credit card validation should not
exceed 10 seconds.
6. When validating credit cards, the screen must provide a status message for the
clients that indicate that an activity is being carried out.
This tells the customer that the validation activity that can take a long time is still ongoing.
in progress and that the system has simply not failed.
7. The maximum acceptable failure rate for ticket issuance requests is 1:10000.
Please note that this is really ROCOF. I have not specified the acceptable number of tickets.
incorrect, as this depends on whether the system includes tracking installations that allow
register the customers' requests. If so, a relatively high failure rate is acceptable now
that customers can complain and obtain refunds. If not, only a very low failure rate is accepted.
low

6.9 Suggest the way in which an engineer responsible for preparing the specification of
system requirements could control the relationships between functional requirements and
non-functional.
Tracking the relationships between functional and non-functional requirements is difficult.
because non-functional requirements are sometimes system-level requirements instead of requirements
which are specific to a single function or group of functions.
An approach that can be used is to explicitly identify non-functional requirements at the level of
system and list them separately. All system requirements that are necessary must be listed.
relevant for each functional requirement. Then, produce a requirements table as shown in
continuation.
Software Engineering

Functional Requirements System requirements not Non-functional requirements


related functions
The system will provide a Security requirement: do not Time requirement: the valve
operation that allows the will allow the release of it must be fully opened
operators open the valve of vapor if work is done within 2 seconds
download to ventilate the of maintenance in any subsequent to the operator
vapor into the atmosphere. steam generation plant. initiate action.

Please note that in this example, the non-functional requirement of the system would normally have
priority over the timing requirement that applies to the specific operation.

6.10 He has obtained a job with a software user who has hired his previous one.
company to develop a system. You discover that your company's interpretation
The current requirements are different from those taken by your previous company. Comment on what
I would do in such a situation. You know that your company's costs will increase if the
ambiguities are not resolved. It also has a confidentiality responsibility for its
previous company.
In such a situation, I would focus on implementing considering the best interpretation.
so that costs are reduced while ensuring that all requirements are met
from the user.

You might also like