course work with the source code for the Environment visual studio
1.1 Statement of the problem
As input data, the program uses the information stored in the file "card.txt": the card type (debit / credit), PIN-code (4 digits), the amount of money (an integer which does not exceed 1 billion in absolute value).
When an error in reading the input data, the program reports this and gives back to the file "card.txt". If a successful read, the program goes to the main menu with the items:
- View the available tools - the ability to display information about the amount contained in the map on the screen or to a file "cash.txt", at the discretion of the user;
- Cash withdrawals - the possibility of withdrawing the amount of money specified by the user. This takes into account the type of cards: Debit cards do not allow to have a negative amount in the account, and allow the credit, but this amount is subtracted from the specified percentage. Subject to specified conditions required by the user to the amount of output to a file "money.txt", and information about the operation is stored in the log file "check.txt", which appears at the end of the work with the card;
- Pick a card - to finish the job and take the card. This feature is active for all work with cards (except when the user enters a PIN-code);
When the user selects the first two points of the program waits for the PIN-code. On the input is given 3 attempts - if the user is 3 times entered the code correctly, the program transfers the file "card.txt" to another folder that mimics the card lock terminal. Upon successful commissioning is carried out before the transition to the selected procedure.
Also, the user can return to the main menu, similar to the process of transition to the end of work.
As the output of the program displays a help message in the work program. Upon completion of the program returns the input file "card.txt", but with the changes if the process was withdrawn a sum of money - in this case, the program gives more files "money.txt" with information about the amount withdrawn and the file "check.txt "information on completed transactions. If the user requests account information, the program displays the information on a screen or in a file "cash.txt", at the discretion of the user.