Вы находитесь на странице: 1из 3

UNIVERSITI TUNKU ABDUL RAHMAN

Faculty : Faculty of Information and Unit Code : UCCD1013


Communication Technology (FICT
PERAK)
Course : IA, IB, CS, CN Unit Title : Analysis and Design of
Information Systems

Year/ : 2010/2011 Lecturer :


Semester
Session : 2011/01 Tutor :

Tutorial 6 (Sample Answers)

1. What is the difference between Structured English and pseudocode?

 Structured English resembles spoken English, pseudocode resembles a programming language.

 Pseudocode is used as a communication tool between analysts and programmers, and


Structured English is used as a communication tool between analysts and users

2. An individual wishes to withdraw cash from an ATM machine. Prepare a structured


English representation for this situation. Please note any assumptions that you make.

A suggested answer is provided below. For simplicity, this representation assumes that the
individual performs only one transaction.

----------------------------------------------------------------------------------------------------------------
Accept Personal-identification-number
PERFORM Validate Personal Identification Number Process
BEGIN IF
IF Personal-identification-number IS CORRECT
THEN PERFORM Withdrawal Process
ELSE PERFORM Unsuccessful Log-in Process
END IF
PERFORM Transaction Completion Process
RETURN

(Validate Personal Identification Number Process)


DO
BEGIN IF
IF Personal-identification-number IS NOT CORRECT
THEN NOTIFY user that Personal-identification-number IS NOT CORRECT AND REQUEST Personal-
identification-number
ELSE RETURN
END IF
UNTIL log-in-attempt is greater than 3
RETURN

(Withdrawal Process)
ACCEPT Requested-withdrawal-amount
BEGIN IF
IF Requested-withdrawal-amount is less than OR equal to Checking-balance
THEN GIVE Requested-withdrawal-amount in cash AND SUBTRACT Requested-withdrawal-
amount from Checking-balance AND RECORD new Checking-balance
ELSE NOTIFY user that Requested-withdrawal-amount is greater than Checking-balance
END IF
RETURN

(Transaction Completion Process)


BEGIN IF
IF Cash IS GIVEN
THEN GENERATE receipt
ELSE GENERATE unsuccessful withdrawal message
ENDIF
END Transaction

(Unsuccessful Log-in Process)


Keep bank card
NOTIFY user that log-in failed
END Transaction

-----------------------------------------------------------------------------------------------------------------

3. An individual wishes to withdraw cash from an ATM machine. Prepare a decision table to
represent this situation. Please note any assumptions that you make.

2
Rules
Conditions/
Courses of 1 2 3
Actions
Correct User Y N Y
ID
Withdrawal < or -- >Bal
Amount = ance
Balan
ce
Give Cash X
Generate X
Receipt
Update X
Checking
Balance
End X X
Transaction

4. An individual wishes to withdraw cash from an ATM machine. Prepare a decision tree to
represent this situation. Please note any assumptions that you make.

Вам также может понравиться