0% found this document useful (0 votes)
5 views2 pages

Bank Transaction System Pseudocode

Uploaded by

superjordanx1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Bank Transaction System Pseudocode

Uploaded by

superjordanx1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Part 2 - Pseudocode SDLC Steps Semester Coding Project

Project Title: A Bank Transaction System


Jordan Wu

BEGIN
SET balance = 0.00
DECLARE transactionType as character
DECLARE transactionAmount as double
SET output format to fixed with 2 decimal places
DISPLAY "Welcome to CISP 360 Simple Banking Application"
WHILE true
DISPLAY "Current Balance: $balance"
DISPLAY "Enter D for Deposit, W for Withdrawal, or Q to Quit: "
READ transactionType
CONVERT transactionType to uppercase
IF transactionType = 'Q' THEN
DISPLAY "Goodbye!"
BREAK loop
ELSE IF transactionType = 'D' THEN
DISPLAY "Enter amount: "
READ transactionAmount
IF transactionAmount >= 0 THEN
ADD transactionAmount to balance
DISPLAY "New Balance: $balance"
ELSE
DISPLAY "Error: Transaction amount cannot be negative."
ELSE IF transactionType = 'W' THEN
DISPLAY "Enter amount: "
READ transactionAmount
IF transactionAmount >= 0 THEN
IF transactionAmount <= balance THEN
SUBTRACT transactionAmount from balance
DISPLAY "New Balance: $balance"
ELSE
DISPLAY "Insufficient funds."
ENDIF
ELSE
DISPLAY "Error: Transaction amount cannot be negative."
ELSE
DISPLAY "Error: Invalid transaction type."
ENDIF
ENDWHILE
END

You might also like