This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ENEE 150: Intermediate Programming Concepts for Engineers Spring 2011 Handout #22 Project #3: Bank Transaction Processing Due Date: April 15, 11:59p.m. In this project, you will build a program that processes bank transactions. Your program will maintain information about banks and user accounts. Your program will permit users to open accounts, make deposits/withdrawals, and close accounts. Because you will not be told in advance how many banks or users there will be, nor the size of text information associated with the banks and users, you must employ dynamic data structures to implement your project. 1 Input Your program will receive transactions from standard input , and perform processing in response to each transaction. We have provided a program, called xact driver , that creates the transactions. This program is posted on the course website which can be found in the following directory on Glue: /afs/glue.umd.edu/department/enee/public_html/class/enee150.S2011/assignments/pr3 You can copy the program to your home directory if you cd to the above directory and type cp xact driver ~ . The xact driver program takes a single command line argu- ment, which specifies a test case number, and then writes to standard output a sequence of transactions. Because the transactions are written to standard output, you can redirect them to the standard input of your program by using the | operator on the UNIX com- mand line. For example, to test your program on test case #1 (assuming your program is called pr3), you can type: xact_driver 1 | pr3 The above command is how we will grade your project. However, to enable you to develop your project on non-Glue platforms, we have also provided the test cases as files on the course website. You can download these test case files from the course website (just follow the Project 3 Files hyperlink), or by copying them from the same directory given above. You can redirect each one of these test cases into the standard input of your program using the < operator on the UNIX command line. For example, your program can run on test case #1 by typing: pr3 < test1.in 1 It is important to emphasize that your program must receive the transactions from stan- dard input. You are not allowed to access the transactions in the test case files by per- forming file I/O from your program. Regardless of where you develop your program, we recommend that you eventually copy your code to the Glue system and try all test cases by redirecting output from the xact driver program directly into the standard input of your program. 2 Transactions and Data Fields Each transaction that the xact driver program sends to your program is a sequence of ASCII characters. In total, there are 8 different types of transactions, each identified by a transaction ID numbered 18: ID Transaction ID Transaction 1 Terminate 5 Print Account 2 New Bank 6 Deposit 3 Print Bank 7 Withdrawal 4 New Account 8 Close Account Each transaction will begin with a transaction ID that specifies the type of transaction...
View Full Document
This note was uploaded on 02/02/2012 for the course ELECTRICAL ENEE150 taught by Professor D.yeung during the Spring '11 term at Maryland.
- Spring '11