Teaches you how to change bank deposits using the primary C # language!!!!

Source: Internet
Author: User

Are you dissatisfied with the status of your life ?

Do you always lament that there is too little pay ?

Do you often find that the items in your phase have been reduced but you still have to feel powerless ?

Let me save your purse!

Next, get to the point:

To change your bank account, you first have to find a bank:

class Bank      {             }

  After finding the bank, run a card at the bank that belongs to him:

classCard {Private stringCardno;//Card number          Private stringCardowner;//Card Holder          Private stringCardpwd;//Password          Private DoubleBalance//Balance             Public DoubleBalance {Get{returnbalance;} Set{balance =value;} }          Public stringCardpwd {Get{returnCardpwd;} Set{cardpwd =value;} }                  Public stringCardowner {Get{returnCardowner;} Set{Cardowner =value;} }                   Public stringCardno {Get{returnCardno;} Set{Cardno =value;} }              }

  There are three elements of the card we must remember AH must remember AH---cards, card holders, passwords

After the above steps are done, the next step is to introduce how the bank deposits, the code may seem to be the following paragraph:

 //Deposit ModuleConsole.WriteLine ("Please enter your account number."); stringCardno =Console.ReadLine ();  for(inti =0; I < cards. Length; i++)            {                     if(Cards[i]! =NULL&& Cards[i]. Cardno = =Cardno) {Flag=true; Console.WriteLine ("Please enter your password"); stringPWD =Console.ReadLine (); if(Cards[i]. Cardpwd = =pwd) {Console.WriteLine ("congratulations on your successful landing! Please enter the amount you want to deposit:"); DoubleGivemoney =Double.                             Parse (Console.ReadLine ()); Cards[i]. Balance= Cards[i]. Balance +Givemoney; Console.WriteLine ("Congratulations on your deposit success, your current balance is: {0}", Cards[i].                             Balance);  Break; }                         Else{Console.WriteLine ("The password you entered is incorrect!");  Break; }                     }             }

  After you know how the system is saved, you can save money on your own card! This is the first way I can teach you how to change your deposit! The next is the second one, but the second one I'm sure people don't really want to do because you're going to be getting less. Yes, that's the way to withdraw money.

//Withdrawal ModuleConsole.WriteLine ("Please enter your account number."); stringCardno =Console.ReadLine ();  for(inti =0; I < cards. Length; i++)             {                 if(Cards[i]! =NULL&& Cards[i]. Cardno = =Cardno) {Flag1=true; Console.WriteLine ("Please enter your password"); stringPWD =Console.ReadLine (); if(Cards[i]. Cardpwd = =pwd) {Console.WriteLine ("congratulations on your successful landing! Please enter the amount you want to withdraw:"); DoubleTakemoney =Double.                         Parse (Console.ReadLine ()); Cards[i]. Balance= Cards[i]. Balance-Takemoney; Console.WriteLine ("Congratulations on your deposit success, your current balance is: {0}", Cards[i].                         Balance);  Break; }                     Else{Console.WriteLine ("The password you entered is incorrect!");  Break; }                 }             }

  Next is the third and fourth method---that is you transfer to your friends or family, or call your good friends to transfer you !

//Transfer ModuleConsole.WriteLine ("Please enter your account number."); stringCardno =Console.ReadLine ();  for(inti =0; I < cards. Length; i++)             {                 if(Cards[i]! =NULL&& Cards[i]. Cardno = =Cardno) {Flag2=true; Console.WriteLine ("Please enter your password"); stringPWD =Console.ReadLine (); if(Cards[i]. Cardpwd = = pwd && cards[i]. balance!=0)                     {                         if(Cards[i]. balance!=0) {Console.WriteLine ("congratulations on your successful landing! Please enter the account you want to transfer to:"); stringTarget =Console.ReadLine ();  for(intj =0; J < cards. Length; J + +)                         {                             if(Cards[j]. Cardno.equals (Target) | | CARDS[J]. cardno!=NULL) {Console.WriteLine ("Please enter your operating amount:"); DoubleTransform =Double.                                Parse (Console.ReadLine ()); if(Transform < cards[i]. Balance && Transform! =0) {Cards[i]. Balance-=Transform; CARDS[J]. Balance+=Transform; Console.WriteLine ("congratulations on your successful transfer! Your current balance is: {0}", Cards[i].                                  Balance);  Break; }                                 Else{Console.WriteLine ("Please enter the correct operating amount:"); }                             }                              Break; }                          Break; }                         Else{Console.WriteLine ("your current balance is insufficient! cannot be transferred!"); }                     }                     Else{Console.WriteLine ("The password you entered is incorrect!");  Break; }                 }             }             returnFlag2; }

  All the way to everyone, you don't have to thank me, by the way, my name is: "Thunder"; by the way, changing the deposit method is the code of the Bank class Oh, don't tell anyone yo!
  In the end, I give you my favorite quote: Do it yourself, clothed

Teaches you how to change bank deposits using the primary C # language!!!!

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.