You are on page 1of 5

Chapter 6: Software Requirements

EE

2010

Exercises

6.3Discussambiguitiesoromissionsinthefollowingstatementofrequirementsforpart ofaticketissuingsystem. An automated ticket issuing system sells rail tickets. Users select their destinations, andinputacreditcardandaPIN.Therailticketisissuedandtheircreditcardaccount charged with its cost. When the user presses the start button, a menu display of potential destinations is activated along with a message to the user to select a destination.Onceadestinationhasbeenselected,usersarerequestedtoinputtheir creditcard.ItsvalidityischeckedandtheuserisrequestedtoinputaPIN.Whenthe credittransactionhasbeenvalidated,theticketisissued. Solutionnotes: Ambiguitiesandomissionsinclude:
o o o o o o

Can a customer buy several tickets for the same destination together or must theybeboughtoneatatime? Cancustomerscancelarequestifamistakehasbeenmade? HowshouldthesystemrespondifaninvalidcardorPINnumberisinput? Whathappensifcustomerstrytoputtheircardinbeforeselectingadestination (astheywouldinATMmachines)? Musttheuserpressthestartbuttonagainiftheywishtobuyanothertickettoa differentdestination? Should the system only sell tickets between the station where the machine is situatedanddirectconnectionsorshoulditincludeallpossibledestinations?


EE 2010

6.5 Draw a sequence diagram showing the actions performed in the ticketissuing system.Youmaymakeanyreasonableassumptionsaboutthesystem.Payparticular attentiontospecifyingusererrors. Solutionnotes:Therearemanypossibilitieshere.Thisisthesuggestedsolution

Machine

Database

StartButton

MenuDisplay SelectedDestination InputCreditCard CreditCard

StartResponse DestinationandTicketsPrices

CardNumber PINRequest PIN <<INVALIDCARD>> IdentificationRequest IdentificationNo. <<INVALIDID>> TransactionConfirmation Confirm BalanceRequest Balance Debit <<INSUFFICIENTCASH>> Card CardRemoved Ticket TicketRemoved Receipt
(1)DestinationSelection

CardOK

DebitResponse

(2)ValidationCard (3)HandleRequest (4)CompleteTransaction


EE 2010

6.6 Using the technique suggested here where natural language is presented in a standardway,writeplausibleuserrequirementsforthefollowingfunctions:

ThecashdispensingfunctioninabankATM. Thespellcheckingandcorrectingfunctioninawordprocessor. An unattended petrol pump system that includes a credit card reader. The customerswipesthecardthroughthereader,andthenspecifiestheamountof fuelrequired.Thefuelisdeliveredandthecustomer'saccountdebited.

Solutionnotes: 1.Dispensingcash 1.1Thesystemmustprovideafacilitywhichallowsaspecifiedamounttocashto beissuedtocustomers.Theamountisrequestedbythecustomerbutthesystem mayreducethisamountifthecustomersdailylimitoroverdraftlimitisreached. 1.2Thesequenceofactionstodispensecashshouldbe: 1.Thecustomerinputstheamountofcashrequired 2.Thesystemchecksthisagainstdailycardlimitsandthecustomersoverdraft limit. 3.Iftheamountbreacheseitheroftheselimits,thenamessageisissuedwhich tells the customer of the maximum amount allowed and the transaction is cancelled. 4.Iftheamountiswithinlimits,therequestedcashshouldbedispensed 5.Thecustomersaccountbalanceanddailycardlimitshouldbereducedbythe amountofcashdispensed. 2.Spellchecking 2.1Thesystemshallprovideauseractivatedfacilitywhichchecksthespellingof wordsinthedocumentagainstspellingsinthesystemdictionaryandusersupplied dictionaries. 2.2Whenawordisfoundinthedocumentwhichisnotinanydictionary,auser queryshouldbeissuedwiththefollowingoptions: 1. Ignorethisinstanceoftheword 2. Ignoreallinstancesoftheword 3. Replacethewordwithasuggestedwordfromthedictionary


EE 2010

4. Replacethewordwithusersuppliedtext 5. Ignorethisinstanceandaddthewordtoaspecifieddictionary 2.3 When a word is discovered which is not inthe dictionary, the system should propose 10 alternative words based on a match between the word found and thoseinthedictionaries. 3.Fueldeliverysystem 3.1 The system should provide an unattended fuel delivery service where a specifiedamountoffuelisdeliveredtocustomers;thecostisdeductedfromthe customerscreditcardaccount. 3.2Thesequenceofactionstodispensefuelshouldbe: 1. Thecustomerselectsthetypeoffueltobedelivered. 2. Thecustomerinputseitheracashlimitoramaximumamountoffueltobe delivered 3. The customer validates the transaction by providing credit card account details. Rationale:Theamountoffuelalloweddependsonthecreditlimitbutcustomers maywishtofillupratherthanhaveaspecifiedamountoffuel.Byspecifyinga maximum, the system can check if credit is available. Note that the definition doesnotsetouthowcreditcarddetailsshouldbeprovided. 4. Thepumpisactivatedandfuelisdelivered,undercustomercontrol. 5. Thetransactionisterminatedeitherwhenthepumpnozzleisreturnedtoits holsterfor15secondsorwhenthecustomersfuelorcashlimitisreached. Rationale:Terminationshouldnotbeimmediatewhenthenozzleisreturnedas thecustomermaywishtorestartthetransactione.g.tofillafuelcanaswellas thecarfueltank.Ifapumpdisplayisavailable,itmaybeappropriatetoissuea Pleasewaitforyourreceiptmessage. 6. Areceiptisprintedforthecustomer. 7. Thefuelstockisupdated.


EE 2010

6.7Describethreedifferenttypesofnonfunctionalrequirementsthatmaybeplaced onasystem.Giveexamplesofeachofthesetypesofrequirements. Solutionnotes:Therearemanypossibilitieshere.Somesuggestionsaregivenbelow


Nonfunctional Requirement Performance Description Examples

Performance requirements set out limits to the performance expected of thesystem.Thesemaybeexpressedin different ways depending on the type of system e.g. number of transactions processedpersecond,responsetimeto userrequests,etc. Defines specific standards or methods which must be used in the developmentprocessforthesystem.

The system must process at least 150transactionspersecond. The maximum response time for any user requestshouldbe2seconds.

Implementation

Thesystemdesignmustbedevelopedusing an objectoriented approach based on the UMLprocess. The system must be implemented in C++,Version3.0.

Usability

Defines requirements which relate to the usability of the system by end users.

All operations which are potentially destructive must include an undo facility which allows users to reverse their action. (This is an example of a functional requirement which is associated with a nonfunctionalrequirement) All operations which are potentially destructivemustbehighlightedinredinthe systemuserinterface.

Safety

Safety requirements are concerned with the overall safe operation of the system.

The system must be certified according to HealthandSafetyRegulationsXYZ123.

You might also like