

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Assignment Discover Ambiguities
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Discover ambiguities or omissions in the following statement of requirements
for part of ticket-issuing systems:
An automated ticket-issuing system sells 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. 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. 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 a personal identifier. When the credit transaction has been validated, the ticket is issued.
Ans: 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?
4.3. Rewrite the above description using the structured approach described
in chapter 4 of the textbook. Resolve the identified ambiguities in an appropriate way.
Ans.
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. Inputs – Destination, credit card number, personal ID number
Outputs – Tickets, error messages
Action – Ask the customer for their destination, when 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