Bank withdrawal and accounting business scenarios
Simulate the specified number of users. each user has an account in the bank and the original funds are randomly generated (an integer ).
The original funds of all users are called the original total assets. Each user can choose to withdraw funds or transfer funds randomly, which is called transactions.
If withdrawal is made, only 1/5 of the account balance is allowed. (If the balance is less than 5 yuan, no withdrawal is allowed .) After withdrawal, the system records the user's cash amount.
If the account is transferred, only 1/2 of the account balance (excluding the non-integer zero header) is allowed. The transfer object is randomly generated, but not included by the parties themselves.
User behavior is independent, transactions are free of service fees, transfers are received immediately, and objects and recorded data are created in the memory.
Design
Read the full text
Category:View comments on software development
ArticleSource: http://hi.baidu.com/zdz8207/blog/item/c1a284440825b84b500ffe13.html