ekostadinov

C# BankAccount

Oct 1st, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.84 KB | None | 0 0
  1. //A bank account has a holder name (first name, middle name and last name), available amount of money (balance), bank name, IBAN, BIC code and 3 credit card numbers associated with the account. Declare the variables needed to keep the information for a single bank account using the appropriate data types and descriptive names.
  2.  
  3. using System;
  4.  
  5.     class BankAccount
  6.     {
  7.         static void Main()
  8.         {
  9.             Console.WriteLine("As employee in our banking group You can create new bank accounts!");
  10.             Console.WriteLine("Please enter the information needed as following: ");
  11.            
  12.             Console.WriteLine("1. In which bank of our group You want to create the account: ");
  13.             string defineBank = Console.ReadLine();
  14.  
  15.             Console.WriteLine("2. Account holder first name: ");
  16.             string firstName = Console.ReadLine();
  17.  
  18.             Console.WriteLine("3. Account holder middle name: ");
  19.             string middleName = Console.ReadLine();
  20.  
  21.             Console.WriteLine("4. Account holder family name: ");
  22.             string familyName = Console.ReadLine();
  23.  
  24.             string holderFullName  = firstName + " " + middleName + " " + familyName;
  25.  
  26.             Console.WriteLine("5. Enter the amount of money (balance) of the account in the {0} bank: ", defineBank);
  27.             decimal accountBalance = decimal.Parse(Console.ReadLine());
  28.  
  29.             Console.WriteLine("6. Enter the IBAN  of the account in the {0} bank: ", defineBank);
  30.             string accountIBAN = Console.ReadLine();
  31.  
  32.  
  33.             Console.WriteLine("7. Enter the BIC code of the account in the {0} bank: ", defineBank);
  34.             string accountBIC = Console.ReadLine();
  35.  
  36.             Console.WriteLine("8. Enter the number of the first credit card associated with the bank account in {0} bank: ", defineBank);
  37.             Console.WriteLine("(Keep in mind that the number is 16 digits long without intervals!)");
  38.  
  39.             Console.WriteLine("- Enter the number of the first credit card:");
  40.             long creditCardNumber1 = long.Parse(Console.ReadLine());
  41.  
  42.             Console.WriteLine(" - Enter the number of the second credit card:");
  43.             long creditCardNumber2 = long.Parse(Console.ReadLine());
  44.  
  45.             Console.WriteLine(" - Enter the number of the third credit card:");
  46.             long creditCardNumber3 = long.Parse(Console.ReadLine());
  47.             Console.WriteLine();
  48.  
  49.             Console.WriteLine("If You filled correctly the form, Your customer is: {0} with bank account balance {1} in {2} bank and: \n bank account IBAN - {3} with BIC code - {4} \n First credit card number - {5} \n Second credit card number - {6}\n Third credit card number - {7}", holderFullName, accountBalance, defineBank, accountIBAN, accountBIC, creditCardNumber1, creditCardNumber2, creditCardNumber3);
  50.  
  51.  
  52.         }
  53.     }
Add Comment
Please, Sign In to add comment