Guest User

Untitled

a guest
Oct 22nd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.33 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Assignment1 {
  4.     class ATM {
  5.  
  6.         const int SAVING_ACCOUNT = 1;
  7.         const int DEBIT_CARD     = 2;
  8.         const int CREDIT_CARD    = 3;
  9.         const int LINE_OF_CREDIT = 4;
  10.  
  11.         static double savingsBalance = 901.45;
  12.         static double debitCardBalance  = 450;
  13.         static double creditCardBalance  = 1500;
  14.         static double lineOfCreditBalance  = 2000;
  15.  
  16.         static void Main();
  17.  
  18.         static void DisplayBalance(int whichAccount) {
  19.             //Action: Current time and date is displayed along with the balance of the
  20.             // account indicated by whichAccount.
  21.  
  22.         }
  23.  
  24.         static void WithdrawAmount(int whichAccount) {
  25.             //Action: Provided that the withdrawal amount does not leave the account
  26.             // with less than the minimum balance, the amount is withdrawn from the nominated
  27.             // account indicated by whichAccount. If the account is either a Debit Card or
  28.             // Credit Card account then a fee of $0.10 is deducted from the remaining balance
  29.             // after a successful withdrawal has occurred. This may leave that account with
  30.             // less than the minimum balance.
  31.  
  32.         }
  33.  
  34.         static void DispenseCash(double amount) {
  35.             //Action:  Displays a message to collect the amount consisting of the actual number
  36.             // of notes of each denomination to be collected.
  37.  
  38.         }
  39.  
  40.         static void TransferAmount(int fromAccount, int toAccount) {
  41.             //Action: Provided that the transfer amount does not leave the fromAccount with a
  42.             // balance of less than $1, the amount is transferred to the nominated account
  43.             // (toAccount) and a transfer fee of $1 is deducted from the fromAccount after the
  44.             // transfer has occurred.
  45.  
  46.         }
  47.  
  48.         static void DisplayMenu() {
  49.             string menu = "\n------------------------------------------------"
  50.                 + "\nWelcome to EziTeller ATM Machine"
  51.                 + "\n\tTransaction Menu:"
  52.                 + "\n\t================="
  53.                 + "\n\t1. Check Balance"
  54.                 + "\n\t2. Withdrawal"
  55.                 + "\n\t3. Transfer"
  56.                 + "\nPlease enter your option(1-3 or 0 to exit)";
  57.  
  58.                 Console.Write(menu);
  59.         }
  60.       }
  61.     }
Add Comment
Please, Sign In to add comment