The Bank management system realizes the function of user registration login deposit, withdrawal transaction record inquiry and modify user information, etc.

Source: Internet
Author: User

========= Project Introduction ========

Bank Account Management System

This project mainly realizes the user registers the login to save, takes the money and modifies the user information function.

The storage and acquisition of user information is implemented through the collection and IO input and output streams.

Save money to withdraw the function by modifying the balance in the user information to achieve

Modify user information to obtain the user information, and then save the modified information to the list, and must delete the original user information.

======== Project Functional Requirements =============

The Bank management system can achieve the following major functions

User registration is successful before user login

User Login Login Successful skip to main interface

Saving money, taking out the function

Make changes to your account information

Query Transaction history


======= Project Technical Framework =========

I. Registration MODULE


1. Determine if the account exists.


① get the user information in the file (Io object input stream objectinputstream and list collection interface implementation class ArrayList)


2. Enter user information from the console (the nextline () and Nextint () methods of the scanner class) and save to the user information file.


① Add user information to the ArrayList collection.


Saves the list of objects of the ArrayList class to a file. The user custom class must be serialized. (IO object output stream ObjectOutputStream)

4. Modify the information function


① Displays the user information.


② Modify user Information Select the information you want to modify (account number, password, name, age, gender) Note: When modifying the account information, to traverse the user account information in the list, the requested account information cannot be the same as the account in the database (call the CheckAccount () method). After modifying the information, remove the user information from the list, add the new account information to the list, and write the list to the user information file (the Savelist () method).


③ Displays the modified user information.

5. Querying the transaction function

When you first trade, create a file named after the user's account to hold the user's transactions for each time.

Each time a deposit or withdrawal is successful, the transaction record (transaction time and transaction amount) is written into the file. The transaction time calls the date class under the Java.util package to get the correct trading time.

Query transactions: Reads the information from the transaction file and displays it to the console.

I. Problems encountered in development and points for attention:

1. Save money function, save money after re-login, the user balance remains unchanged.

Cause analysis and resolution: Save the new user information to the list and write it into the folder. But the original user information was not deleted. Causes the information to update data to fail. WORKAROUND: Delete the existing user information.

2. When modifying the user's account, ignoring the modified information can not be the same as the user account in the database, resulting in an error when logging in again.

Workaround: Compare the new account entered with the user account in the database, and if the same occurs, require a re-modification.

3. Remember to close the stream when using the IO input and output stream.

4. When obtaining the user information, be careful to determine whether the list is empty (that is, there is no user information), not the size of the empty larger than 0 and then the list of traversal.

5. When you save a transaction, call the date class under the Java.util package to get the time of each transaction, allowing the user to query the transaction details. Remember to append the transaction records to the account file when you write them in BufferedWriter and FileWriter. Doing so will result in failure to write to the data.


The Bank management system realizes the function of user registration login deposit, withdrawal transaction record inquiry and modify user information, etc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.