******************************************************************************* * README * ******************************************************************************* Name of program: banking Author: David Bozarth Started: 9 May 2004 This file Modified: 13 May 2004 History: v1.2: Implements function bankBalance. ------------------------------------------------------------------------------- Files banking.s - main function source file personClass.h - specifies offsets for the data fields of the person class personClass.s - function that serves as "constructor" for person objects personDisplay.s - function that displays the content of a person object personGet.s - function that guides the user to initialize a person object bankClass.h - specifies offsets for the data fields of the bank class bankClass.s - function that serves as "constructor" for bank objects bankDisplay.s - function that displays the content of a bank object bankTransact.s - function that guides the user to conduct a transaction bankTransMulti.s - function that prompts for multiple account transactions bankBalance.s - function that returns the balance value from a bank object writeStr.s - function that writes a C-style string on the standard output readStr.s - function that reads one line from the standard input uDecToInt.s - function that converts an unsigned decimal number to an int sDecToInt.s - function that converts a signed decimal number to an int uIntToDec.s - function that converts an int to a text string that represents the int as an unsigned decimal number sIntToDec.s - function that converts an int to a text string that represents the int as a signed decimal number getDec.s - function that gets a signed decimal integer from keyboard putDec.s - function that displays a signed decimal integer on the screen sumList.s - function that sums a list of integers newline.s - function that sends a newline character to the display copyString.s - function that copies a string from source to destination, up to maximum number of characters specified fillZero.s - function that fills memory with zeros from specified starting address, to specified number of bytes makefile - to create the program README - this file ----------------------------------------------------------------------------------- Activity The program: - constructs a person object, using a default constructor. - constructs two bank objects, using a constructor that takes a starting balance and an account number as arguments. - displays each of the three newly constructed objects. - allows the user to enter his/her personal information for the person object. - allows the user to perform any number of transactions on the first bank object. The transactions are signed decimal integers. A positive number is a "deposit" and a negative is a "withdrawl." A transaction amount of zero signals the end of transactions for this account. - allows the user to perform any number of transactions on the second bank object. The transactions are signed decimal integers. A positive number is a "deposit" and a negative is a "withdrawl." A transaction amount of zero signals the end of transactions for this account. - displays each of the three objects. - displays the sum of the two account balances. Input requirements The user will enter signed decimal integers such that the sum never exceeds a 32-bit signed integer. If the 32-bit limit is exceeded by some sum during the process, the result is not guaranteed to be correct, and no error message will display. If the user enters a numeral too large to represent as an signed int (before or after multiplication by 10), then an error message will display, followed by display of additional results that are not guaranteed to be correct. If the user enters a text string containing a sign character ('+' or '-') in any position other than the first position, then the output is not guaranteed to be correct. If the user enters a text string containing a non-numeric, non-sign character in any position, then the output is not guaranteed to be correct. ----------------------------------------------------------------------------------- TESTING Initial display: Good Customer 123 Fourth Street State College, PA 12345 CHK-987654 $ 0 SAV-012345 $ 0 End display should be same format but with sum appended: Diane Bollical 666 Administration Drive University City, HL 78737 CHK-987654 $ 123 SAV-012345 $ 111 TOTAL FUNDS $ 234 _condition_ _input data_ _required output_ _passed?_ ................................................................................... begin acct. negative number "Insufficient funds..." smaller balance larger negative number "Insufficient funds..." OK balance OK withdrawal/deposit report transaction amount & new balance any zero end account transaction set ................................................................................... ................................................................................... Results I did not get all the error messages implemented "insufficient funds" etc. Other required features are implemented and work according to specification. -----------------------------------------------------------------------------------