I have to write a pseudocode for an ATM, but I am having trouble with calling modules. I know that you simply type "CALL (procedure name)", I just want to be sure that I am going about this correctly. Is the following the correct way to call a module?
Procedure show_menu_c
Declare menu_option as interger
DISPLAY “Here is ATM Menu”
DISPLAY “1. Deposit”
DISPLAY “2. Withdraw”
DISPLAY “3. Balance Inquiry”
DISPLAY “4. Exit”
Prompt “For Deposit type 1, For Withdraw type 2, For Balance Inquiry type 3, For Exit type 4”
INPUT menu_option
IF 1 THEN
CALL Procedure deposit
IF 2 THEN
CALL Procedure withdraw
IF 3 THEN
CALL Procedure show_balance
IF 4 THEN
CALL Procedure return_card
ENDIF
END show_menu_c
Trouble with psuedocode and calling modules
Page 1 of 12 Replies - 782 Views - Last Post: 14 April 2012 - 04:20 PM
Replies To: Trouble with psuedocode and calling modules
#2
Re: Trouble with psuedocode and calling modules
Posted 14 April 2012 - 03:01 PM
Its not real code. I don't think there is a wrong way to not actually call something in not code.
If you understand the logic you have laid out so you can translate it to the real code in whatever language you are coding in then it should be fine.
If you understand the logic you have laid out so you can translate it to the real code in whatever language you are coding in then it should be fine.
#3
Re: Trouble with psuedocode and calling modules
Posted 14 April 2012 - 04:20 PM
The most important thing is to be consistent.
The next thing is to be descriptive enough gíven the level of abstraction.
The next thing is to be descriptive enough gíven the level of abstraction.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|